home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume22 / auth-utils / part01 next >
Encoding:
Internet Message Format  |  1990-04-29  |  71.6 KB

  1. Subject:  v22i003:  Utilities for auth2.1 server, Part01/03
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: dfa79d9b d19381f0 358797c1 05d5e977
  5.  
  6. Submitted-by: Daniel J. Bernstein <brnstnd@acf10.nyu.edu>
  7. Posting-number: Volume 22, Issue 3
  8. Archive-name: auth-utils/part01
  9.  
  10. authutil 1.0 - scripts and utilities for auth
  11.  
  12. This package is a collection of shell scripts and utilities, some
  13. illustrating how to use the auth package, some making it easier to use.
  14. None of authutil is strictly necessary for installing and using auth, but
  15. you'll probably find it worthwhile to at least glance through each
  16. directory. Users are encouraged to submit small, generally useful scripts
  17. and utilities to Daniel J. Bernstein, brnstnd@acf10.nyu.edu, for possible
  18. incorporation into the next authutil version.
  19.  
  20. Directories:
  21. aport           Utilities to give better control over attachport and authtcp
  22. clients         Scripts using authtcp for standard TCP clients
  23. servers         Scripts using attachport for standard TCP servers
  24. sendmail-auth   How to configure sendmail to use auth
  25. tam             TAM: the Trivial Authenticated Mail system
  26. util            Short, general utility programs
  27.  
  28. The directories are independent, so there's no top-level Makefile. You
  29. should go through the README files in each directory one at a time.
  30. #! /bin/sh
  31. # This is a shell archive.  Remove anything before this line, then unpack
  32. # it by saving it into a file and typing "sh file".  To overwrite existing
  33. # files, type "sh file -c".  You can also feed this as standard input via
  34. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  35. # will see the following message at the end:
  36. #        "End of archive 1 (of 3)."
  37. # Contents:  CHANGES FILES MANIFEST README VERSIONS aport aport/CHANGES
  38. #   aport/Makefile aport/djberr.h aport/listaport.man clients
  39. #   clients/CHANGES clients/Makefile clients/date@ clients/date@.man
  40. #   clients/echoconnect clients/echoconnect.man clients/finger@
  41. #   clients/finger@.man clients/mconnect clients/mconnect.man
  42. #   clients/nconnect clients/nconnect.man clients/nullconnect
  43. #   clients/nullconnect.man clients/who@ clients/who@.man
  44. #   sendmail-auth sendmail-auth/CHANGES sendmail-auth/cf.include
  45. #   sendmail-auth/in.maild sendmail-auth/out.mail
  46. #   sendmail-auth/rc.include servers servers/CHANGES
  47. #   servers/in.daytimed servers/in.echod servers/in.fingerd
  48. #   servers/in.nulld servers/in.usersd servers/out.finger
  49. #   servers/out.fingerlocal servers/out.fingernet servers/rc.include
  50. #   servers/startservers tam tam/CHANGES tam/Makefile tam/rc.include
  51. #   tam/services.include tam/tam2look tam/tam2look.man tam/tam2mail
  52. #   tam/tam2mail.man tam/tamd tam/tamd.man tam/tamdel.man
  53. #   tam/tamprint.c tam/tamprint.man tam/tamsend tam/tamsend.man
  54. #   tam/tamsetup.c tam/tamsetup.man util util/CHANGES util/Makefile
  55. #   util/README util/addcr.c util/addcr.man util/delcr.c
  56. #   util/delcr.man util/flock.c util/flock.man util/rewind.c
  57. #   util/rewind.man util/setuid.c util/setuid.man util/u@h2h.c
  58. #   util/u@h2h.man util/u@h2u.c util/u@h2u.man
  59. # Wrapped by rsalz@litchi.bbn.com on Mon Apr 30 16:18:23 1990
  60. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  61. if test -f 'CHANGES' -a "${1}" != "-c" ; then 
  62.   echo shar: Will not clobber existing file \"'CHANGES'\"
  63. else
  64. echo shar: Extracting \"'CHANGES'\" \(31 characters\)
  65. sed "s/^X//" >'CHANGES' <<'END_OF_FILE'
  66. X4/20/90: servers 1.0 complete.
  67. END_OF_FILE
  68. if test 31 -ne `wc -c <'CHANGES'`; then
  69.     echo shar: \"'CHANGES'\" unpacked with wrong size!
  70. fi
  71. # end of 'CHANGES'
  72. fi
  73. if test -f 'FILES' -a "${1}" != "-c" ; then 
  74.   echo shar: Will not clobber existing file \"'FILES'\"
  75. else
  76. echo shar: Extracting \"'FILES'\" \(1500 characters\)
  77. sed "s/^X//" >'FILES' <<'END_OF_FILE'
  78. XCHANGES
  79. XFILES
  80. XREADME
  81. XVERSIONS
  82. Xsendmail-auth
  83. Xsendmail-auth/CHANGES
  84. Xsendmail-auth/README
  85. Xsendmail-auth/cf.include
  86. Xsendmail-auth/rc.include
  87. Xsendmail-auth/in.maild
  88. Xsendmail-auth/out.mail
  89. Xtam
  90. Xtam/CHANGES
  91. Xtam/README
  92. Xtam/Makefile
  93. Xtam/rc.include
  94. Xtam/services.include
  95. Xtam/tamd
  96. Xtam/tamdel.c
  97. Xtam/tamprint.c
  98. Xtam/tamsetup.c
  99. Xtam/tam2look
  100. Xtam/tam2mail
  101. Xtam/tamsend
  102. Xtam/tamd.man
  103. Xtam/tamdel.man
  104. Xtam/tamprint.man
  105. Xtam/tamsetup.man
  106. Xtam/tam2look.man
  107. Xtam/tam2mail.man
  108. Xtam/tamsend.man
  109. Xtam/TAM.doc
  110. Xclients
  111. Xclients/CHANGES
  112. Xclients/README
  113. Xclients/Makefile
  114. Xclients/date@
  115. Xclients/finger@
  116. Xclients/who@
  117. Xclients/mconnect
  118. Xclients/nconnect
  119. Xclients/echoconnect
  120. Xclients/nullconnect
  121. Xclients/inews
  122. Xclients/date@.man
  123. Xclients/finger@.man
  124. Xclients/who@.man
  125. Xclients/mconnect.man
  126. Xclients/nconnect.man
  127. Xclients/echoconnect.man
  128. Xclients/nullconnect.man
  129. Xservers
  130. Xservers/CHANGES
  131. Xservers/README
  132. Xservers/in.chargend
  133. Xservers/in.daytimed
  134. Xservers/in.echod
  135. Xservers/in.fingerd
  136. Xservers/in.nulld
  137. Xservers/in.usersd
  138. Xservers/out.finger
  139. Xservers/out.fingerlocal
  140. Xservers/out.fingernet
  141. Xservers/rc.include
  142. Xservers/services
  143. Xservers/startservers
  144. Xutil
  145. Xutil/CHANGES
  146. Xutil/README
  147. Xutil/Makefile
  148. Xutil/addcr.c
  149. Xutil/addcr.man
  150. Xutil/delcr.c
  151. Xutil/delcr.man
  152. Xutil/flock.c
  153. Xutil/flock.man
  154. Xutil/rewind.c
  155. Xutil/rewind.man
  156. Xutil/setuid.c
  157. Xutil/setuid.man
  158. Xutil/u@h2h.c
  159. Xutil/u@h2h.man
  160. Xutil/u@h2u.c
  161. Xutil/u@h2u.man
  162. Xaport
  163. Xaport/CHANGES
  164. Xaport/README
  165. Xaport/Makefile
  166. Xaport/djberr.h
  167. Xaport/killaport.c
  168. Xaport/listaport.c
  169. Xaport/checkaport.c
  170. Xaport/killaport.man
  171. Xaport/listaport.man
  172. Xaport/checkaport.man
  173. END_OF_FILE
  174. if test 1500 -ne `wc -c <'FILES'`; then
  175.     echo shar: \"'FILES'\" unpacked with wrong size!
  176. fi
  177. # end of 'FILES'
  178. fi
  179. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  180.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  181. else
  182. echo shar: Extracting \"'MANIFEST'\" \(3090 characters\)
  183. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  184. X   File Name        Archive #    Description
  185. X-----------------------------------------------------------
  186. X CHANGES                    1    
  187. X FILES                      1    
  188. X MANIFEST                   1    This shipping list
  189. X README                     1    
  190. X VERSIONS                   1    
  191. X aport                      1    
  192. X aport/CHANGES              1    
  193. X aport/Makefile             1    
  194. X aport/README               2    
  195. X aport/checkaport.c         3    
  196. X aport/checkaport.man       2    
  197. X aport/djberr.h             1    
  198. X aport/killaport.c          2    
  199. X aport/killaport.man        2    
  200. X aport/listaport.c          2    
  201. X aport/listaport.man        1    
  202. X clients                    1    
  203. X clients/CHANGES            1    
  204. X clients/Makefile           1    
  205. X clients/README             2    
  206. X clients/date@              1    
  207. X clients/date@.man          1    
  208. X clients/echoconnect        1    
  209. X clients/echoconnect.man    1    
  210. X clients/finger@            1    
  211. X clients/finger@.man        1    
  212. X clients/inews              2    
  213. X clients/mconnect           1    
  214. X clients/mconnect.man       1    
  215. X clients/nconnect           1    
  216. X clients/nconnect.man       1    
  217. X clients/nullconnect        1    
  218. X clients/nullconnect.man    1    
  219. X clients/who@               1    
  220. X clients/who@.man           1    
  221. X sendmail-auth              1    
  222. X sendmail-auth/CHANGES      1    
  223. X sendmail-auth/README       2    
  224. X sendmail-auth/cf.include   1    
  225. X sendmail-auth/in.maild     1    
  226. X sendmail-auth/out.mail     1    
  227. X sendmail-auth/rc.include   1    
  228. X servers                    1    
  229. X servers/CHANGES            1    
  230. X servers/README             2    
  231. X servers/in.chargend        2    
  232. X servers/in.daytimed        1    
  233. X servers/in.echod           1    
  234. X servers/in.fingerd         1    
  235. X servers/in.nulld           1    
  236. X servers/in.usersd          1    
  237. X servers/out.finger         1    
  238. X servers/out.fingerlocal    1    
  239. X servers/out.fingernet      1    
  240. X servers/rc.include         1    
  241. X servers/services           2    
  242. X servers/startservers       1    
  243. X tam                        1    
  244. X tam/CHANGES                1    
  245. X tam/Makefile               1    
  246. X tam/README                 2    
  247. X tam/TAM.doc                2    
  248. X tam/rc.include             1    
  249. X tam/services.include       1    
  250. X tam/tam2look               1    
  251. X tam/tam2look.man           1    
  252. X tam/tam2mail               1    
  253. X tam/tam2mail.man           1    
  254. X tam/tamd                   1    
  255. X tam/tamd.man               1    
  256. X tam/tamdel.c               2    
  257. X tam/tamdel.man             1    
  258. X tam/tamprint.c             1    
  259. X tam/tamprint.man           1    
  260. X tam/tamsend                1    
  261. X tam/tamsend.man            1    
  262. X tam/tamsetup.c             1    
  263. X tam/tamsetup.man           1    
  264. X util                       1    
  265. X util/CHANGES               1    
  266. X util/Makefile              1    
  267. X util/README                1    
  268. X util/addcr.c               1    
  269. X util/addcr.man             1    
  270. X util/delcr.c               1    
  271. X util/delcr.man             1    
  272. X util/flock.c               1    
  273. X util/flock.man             1    
  274. X util/rewind.c              1    
  275. X util/rewind.man            1    
  276. X util/setuid.c              1    
  277. X util/setuid.man            1    
  278. X util/u@h2h.c               1    
  279. X util/u@h2h.man             1    
  280. X util/u@h2u.c               1    
  281. X util/u@h2u.man             1    
  282. END_OF_FILE
  283. if test 3090 -ne `wc -c <'MANIFEST'`; then
  284.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  285. fi
  286. # end of 'MANIFEST'
  287. fi
  288. if test -f 'README' -a "${1}" != "-c" ; then 
  289.   echo shar: Will not clobber existing file \"'README'\"
  290. else
  291. echo shar: Extracting \"'README'\" \(1251 characters\)
  292. sed "s/^X//" >'README' <<'END_OF_FILE'
  293. Xauthutil 1.0 - scripts and utilities for auth
  294. X
  295. XThis package is a collection of shell scripts and utilities, some
  296. Xillustrating how to use the auth package, some making it easier to use.
  297. XNone of authutil is strictly necessary for installing and using auth,
  298. Xbut you'll probably find it worthwhile to at least glance through each
  299. Xdirectory. Users are encouraged to submit small, generally useful
  300. Xscripts and utilities to Daniel J. Bernstein, brnstnd@acf10.nyu.edu,
  301. Xfor possible incorporation into the next authutil version.
  302. X
  303. XThis distribution packaged April 20, 1990.
  304. X
  305. XFiles:
  306. XCHANGES         Description of changes since first distributed version
  307. XREADME          This document
  308. XVERSIONS        Version listing
  309. XFILES           Manifest
  310. X
  311. XDirectories:
  312. Xaport           Utilities to give better control over attachport and authtcp
  313. Xclients         Scripts using authtcp for standard TCP clients
  314. Xservers         Scripts using attachport for standard TCP servers
  315. Xsendmail-auth   How to configure sendmail to use auth
  316. Xtam             TAM: the Trivial Authenticated Mail system
  317. Xutil            Short, general utility programs
  318. X
  319. XThe directories are independent, so there's no top-level Makefile. You
  320. Xshould go through the README files in each directory one at a time.
  321. END_OF_FILE
  322. if test 1251 -ne `wc -c <'README'`; then
  323.     echo shar: \"'README'\" unpacked with wrong size!
  324. fi
  325. # end of 'README'
  326. fi
  327. if test -f 'VERSIONS' -a "${1}" != "-c" ; then 
  328.   echo shar: Will not clobber existing file \"'VERSIONS'\"
  329. else
  330. echo shar: Extracting \"'VERSIONS'\" \(1043 characters\)
  331. sed "s/^X//" >'VERSIONS' <<'END_OF_FILE'
  332. X 4/23/90: authutil 1.0
  333. X 4/23/90:   sendmail-auth 1.0
  334. X 4/23/90:   tam 1.0
  335. X 4/23/90:     tamd 1.0
  336. X 4/23/90:     tamdel 1.0
  337. X 4/23/90:     tamprint 1.0
  338. X 4/23/90:     tamsetup 1.0
  339. X 4/23/90:     tam2look 1.0
  340. X 4/23/90:     tam2mail 1.0
  341. X 4/23/90:     tamsend 1.0
  342. X 4/20/90:   clients 1.0
  343. X 4/20/90:     date@ 1.0
  344. X 4/20/90:     finger@ 1.0
  345. X 4/20/90:     who@ 1.0
  346. X 4/20/90:     mconnect 1.0
  347. X 4/20/90:     nconnect 1.0
  348. X 4/20/90:     echoconnect 1.0
  349. X 4/20/90:     nullconnect 1.0
  350. X 4/20/90:     inews 1.0
  351. X 4/20/90:   servers 1.0
  352. X 4/20/90:     in.chargend 1.0
  353. X 4/20/90:     in.daytimed 1.0
  354. X 4/20/90:     in.echod 1.0
  355. X 4/20/90:     in.fingerd 1.0
  356. X 4/20/90:     in.nulld 1.0
  357. X 4/20/90:     in.usersd 1.0
  358. X 4/20/90:     out.finger 1.0
  359. X 4/20/90:     startservers 1.0
  360. X 4/20/90:   util 1.0
  361. X 4/20/90:     addcr 1.0
  362. X 4/20/90:     delcr 1.0
  363. X 4/20/90:     flock 1.0
  364. X 4/20/90:     rewind 1.0
  365. X 4/20/90:     setuid 1.0
  366. X 4/20/90:     u@h2h 1.0
  367. X 4/20/90:     u@h2u 1.0
  368. X 4/23/90:   aport 1.0
  369. X 4/23/90:     killaport 1.0
  370. X 4/23/90:     listaport 1.0
  371. X 4/23/90:     checkaport 1.0
  372. END_OF_FILE
  373. if test 1043 -ne `wc -c <'VERSIONS'`; then
  374.     echo shar: \"'VERSIONS'\" unpacked with wrong size!
  375. fi
  376. # end of 'VERSIONS'
  377. fi
  378. if test ! -d 'aport' ; then
  379.     echo shar: Creating directory \"'aport'\"
  380.     mkdir 'aport'
  381. fi
  382. if test -f 'aport/CHANGES' -a "${1}" != "-c" ; then 
  383.   echo shar: Will not clobber existing file \"'aport/CHANGES'\"
  384. else
  385. echo shar: Extracting \"'aport/CHANGES'\" \(135 characters\)
  386. sed "s/^X//" >'aport/CHANGES' <<'END_OF_FILE'
  387. X4/23/90: aport utilities version 1.0.
  388. X4/23/90: checkaport version 1.0.
  389. X4/23/90: killaport version 1.0.
  390. X4/23/90: listaport version 1.0.
  391. END_OF_FILE
  392. if test 135 -ne `wc -c <'aport/CHANGES'`; then
  393.     echo shar: \"'aport/CHANGES'\" unpacked with wrong size!
  394. fi
  395. # end of 'aport/CHANGES'
  396. fi
  397. if test -f 'aport/Makefile' -a "${1}" != "-c" ; then 
  398.   echo shar: Will not clobber existing file \"'aport/Makefile'\"
  399. else
  400. echo shar: Extracting \"'aport/Makefile'\" \(757 characters\)
  401. sed "s/^X//" >'aport/Makefile' <<'END_OF_FILE'
  402. XCC=cc
  403. XCCOPTS=-s -O
  404. X
  405. X# -DAUTHDIR=\"directory\"   to override default of /usr/etc/auth;
  406. X#                           should be the same as in the auth package
  407. X
  408. XNROFF=nroff
  409. XNROFFOPTS=-man
  410. X
  411. Xdefault: all
  412. X
  413. Xall: listaport killaport checkaport listaport.1 killaport.1 checkaport.8
  414. X
  415. Xcheckaport: checkaport.c Makefile
  416. X    cc $(CCOPTS) -o checkaport checkaport.c
  417. X
  418. Xcheckaport.8: checkaport.man Makefile
  419. X    nroff $(NROFFOPTS) < checkaport.man > checkaport.8
  420. X
  421. Xkillaport: killaport.c Makefile
  422. X    cc $(CCOPTS) -o killaport killaport.c
  423. X
  424. Xkillaport.1: killaport.man Makefile
  425. X    nroff $(NROFFOPTS) < killaport.man > killaport.1
  426. X
  427. Xlistaport: listaport.c Makefile
  428. X    cc $(CCOPTS) -o listaport listaport.c
  429. X
  430. Xlistaport.1: listaport.man Makefile
  431. X    nroff $(NROFFOPTS) < listaport.man > listaport.1
  432. END_OF_FILE
  433. if test 757 -ne `wc -c <'aport/Makefile'`; then
  434.     echo shar: \"'aport/Makefile'\" unpacked with wrong size!
  435. fi
  436. # end of 'aport/Makefile'
  437. fi
  438. if test -f 'aport/djberr.h' -a "${1}" != "-c" ; then 
  439.   echo shar: Will not clobber existing file \"'aport/djberr.h'\"
  440. else
  441. echo shar: Extracting \"'aport/djberr.h'\" \(491 characters\)
  442. sed "s/^X//" >'aport/djberr.h' <<'END_OF_FILE'
  443. X/* djberr.h, 11/1/89. */
  444. X
  445. X#ifndef __DJBERRH_
  446. X#define __DJBERRH_
  447. X
  448. Xextern int errno;
  449. X
  450. X#define errn(s) (((void) fputs(s,stderr)), putc('\n',stderr))
  451. X#define err(s) (fputs(s,stderr))
  452. X#define errn2(s,t) (((void) fprintf(stderr,s,t)), putc('\n',stderr))
  453. X#define errn3(s,t,u) (((void) fprintf(stderr,s,t,u)), putc('\n',stderr))
  454. X#define perrn2(s,t) { int dummyerrno = errno; (void) fprintf(stderr,s,t); \
  455. X              (void) fputs(": ",stderr); errno = dummyerrno; \
  456. X              (void) perror(""); }
  457. X
  458. X#endif
  459. END_OF_FILE
  460. if test 491 -ne `wc -c <'aport/djberr.h'`; then
  461.     echo shar: \"'aport/djberr.h'\" unpacked with wrong size!
  462. fi
  463. # end of 'aport/djberr.h'
  464. fi
  465. if test -f 'aport/listaport.man' -a "${1}" != "-c" ; then 
  466.   echo shar: Will not clobber existing file \"'aport/listaport.man'\"
  467. else
  468. echo shar: Extracting \"'aport/listaport.man'\" \(1480 characters\)
  469. sed "s/^X//" >'aport/listaport.man' <<'END_OF_FILE'
  470. X.TH listaport 1
  471. X.SH NAME
  472. Xlistaport \- list all current attachports you own
  473. X.SH SYNTAX
  474. Xlistaport
  475. X[
  476. X\fB\-ACHUVW\fI
  477. X]
  478. X.SH DESCRIPTION
  479. X.I listaport
  480. Xgives the
  481. Xuser name, port number, and process id
  482. Xfor every
  483. X.I attachport
  484. Xyou own,
  485. Xor for every
  486. X.I attachport
  487. Xrunning on the system
  488. Xif you are root.
  489. X.PP
  490. XOptions
  491. X.B ACHUVW
  492. Xprint the authorship notice,
  493. Xcopyright notice,
  494. Xhelp notice,
  495. Xshort usage summary,
  496. Xversion number,
  497. Xand warranty information respectively.
  498. X.SH FILES
  499. X/usr/etc/auth/tcp
  500. XAuthentication directory
  501. X.SH "EXIT VALUE"
  502. X0 upon success;
  503. X1 for usage messages;
  504. X2 if 
  505. X.I listaport
  506. Xcan't get into the authentication directory;
  507. X3 if 
  508. X.I listaport
  509. Xcan't read the authentication directory;
  510. X4 if you're not listed in your password file.
  511. X.SH DIAGNOSTICS
  512. X.TP
  513. X.I who are you?
  514. XYou're not listed in your password file.
  515. X.TP
  516. X.I cannot change to directory
  517. X.I listaport
  518. Xdoesn't have access to the authentication directory.
  519. X.TP
  520. X.I cannot read directory
  521. XShouldn't happen.
  522. X.TP
  523. X.I warning: cannot open lock file
  524. XShouldn't happen.
  525. X.TP
  526. X.I warning: cannot read lock file
  527. XShouldn't happen.
  528. X.TP
  529. X.I warning: corrupted lock file
  530. XSomeone has attempted to breach
  531. X.I attachport
  532. Xsecurity on this port.
  533. XReport this condition to your
  534. Xsystem administrator.
  535. X.SH BUGS
  536. XNone known.
  537. X.SH MACHINES
  538. X.I listaport
  539. Xhas been tested
  540. Xon an Astronautics ZS-2 running ZSUnix.
  541. X.SH VERSION
  542. Xlistaport version 1.0, dated 4/23/90.
  543. X.SH AUTHOR
  544. XCopyright 1990, Daniel J. Bernstein.
  545. X.SH "SEE ALSO"
  546. Xattachport(1),
  547. Xkillaport(1),
  548. Xcheckaport(8)
  549. END_OF_FILE
  550. if test 1480 -ne `wc -c <'aport/listaport.man'`; then
  551.     echo shar: \"'aport/listaport.man'\" unpacked with wrong size!
  552. fi
  553. # end of 'aport/listaport.man'
  554. fi
  555. if test ! -d 'clients' ; then
  556.     echo shar: Creating directory \"'clients'\"
  557.     mkdir 'clients'
  558. fi
  559. if test -f 'clients/CHANGES' -a "${1}" != "-c" ; then 
  560.   echo shar: Will not clobber existing file \"'clients/CHANGES'\"
  561. else
  562. echo shar: Extracting \"'clients/CHANGES'\" \(30 characters\)
  563. sed "s/^X//" >'clients/CHANGES' <<'END_OF_FILE'
  564. X4/20/90: clients version 1.0.
  565. END_OF_FILE
  566. if test 30 -ne `wc -c <'clients/CHANGES'`; then
  567.     echo shar: \"'clients/CHANGES'\" unpacked with wrong size!
  568. fi
  569. # end of 'clients/CHANGES'
  570. fi
  571. if test -f 'clients/Makefile' -a "${1}" != "-c" ; then 
  572.   echo shar: Will not clobber existing file \"'clients/Makefile'\"
  573. else
  574. echo shar: Extracting \"'clients/Makefile'\" \(735 characters\)
  575. sed "s/^X//" >'clients/Makefile' <<'END_OF_FILE'
  576. XCC=cc
  577. XCCOPTS=-s -O
  578. XNROFF=nroff
  579. XNROFFOPTS=-man
  580. X
  581. Xdefault: all
  582. X
  583. Xall: date@.1 finger@.1 who@.1 mconnect.1 nconnect.1 echoconnect.1 nullconnect.1
  584. X
  585. Xdate@.1: date@.man Makefile
  586. X    $(NROFF) $(NROFFOPTS) < date@.man > date@.1
  587. X
  588. Xfinger@.1: finger@.man Makefile
  589. X    $(NROFF) $(NROFFOPTS) < finger@.man > finger@.1
  590. X
  591. Xwho@.1: who@.man Makefile
  592. X    $(NROFF) $(NROFFOPTS) < who@.man > who@.1
  593. X
  594. Xmconnect.1: mconnect.man Makefile
  595. X    $(NROFF) $(NROFFOPTS) < mconnect.man > mconnect.1
  596. X
  597. Xnconnect.1: nconnect.man Makefile
  598. X    $(NROFF) $(NROFFOPTS) < nconnect.man > nconnect.1
  599. X
  600. Xechoconnect.1: echoconnect.man Makefile
  601. X    $(NROFF) $(NROFFOPTS) < echoconnect.man > echoconnect.1
  602. X
  603. Xnullconnect.1: nullconnect.man Makefile
  604. X    $(NROFF) $(NROFFOPTS) < nullconnect.man > nullconnect.1
  605. END_OF_FILE
  606. if test 735 -ne `wc -c <'clients/Makefile'`; then
  607.     echo shar: \"'clients/Makefile'\" unpacked with wrong size!
  608. fi
  609. # end of 'clients/Makefile'
  610. fi
  611. if test -f 'clients/date@' -a "${1}" != "-c" ; then 
  612.   echo shar: Will not clobber existing file \"'clients/date@'\"
  613. else
  614. echo shar: Extracting \"'clients/date@'\" \(179 characters\)
  615. sed "s/^X//" >'clients/date@' <<'END_OF_FILE'
  616. X#!/bin/sh
  617. X# date@ version 1.0, 4/20/90.
  618. X# Placed into the public domain by Daniel J. Bernstein.
  619. X# Requires delcr.
  620. Xauthtcp -XR -- "${1-`hostname`}" daytime sh -c 'cat <&6' | delcr
  621. END_OF_FILE
  622. if test 179 -ne `wc -c <'clients/date@'`; then
  623.     echo shar: \"'clients/date@'\" unpacked with wrong size!
  624. fi
  625. chmod +x 'clients/date@'
  626. # end of 'clients/date@'
  627. fi
  628. if test -f 'clients/date@.man' -a "${1}" != "-c" ; then 
  629.   echo shar: Will not clobber existing file \"'clients/date@.man'\"
  630. else
  631. echo shar: Extracting \"'clients/date@.man'\" \(319 characters\)
  632. sed "s/^X//" >'clients/date@.man' <<'END_OF_FILE'
  633. X.TH date@ 1
  634. X.SH NAME
  635. Xdate@ \- print date on remote host
  636. X.SH SYNTAX
  637. Xdate@
  638. X[
  639. X.I host
  640. X]
  641. X.SH DESCRIPTION
  642. X.I date@
  643. Xprints the date on a remote host
  644. Xthrough the
  645. Xdaytime server.
  646. XIf
  647. X.I host
  648. Xis not given,
  649. X.I date@
  650. Xconnects to the local daytime server.
  651. X.SH VERSION
  652. Xdate@ version 1.0, dated April 20, 1990.
  653. X.SH "SEE ALSO"
  654. Xdate(1)
  655. END_OF_FILE
  656. if test 319 -ne `wc -c <'clients/date@.man'`; then
  657.     echo shar: \"'clients/date@.man'\" unpacked with wrong size!
  658. fi
  659. # end of 'clients/date@.man'
  660. fi
  661. if test -f 'clients/echoconnect' -a "${1}" != "-c" ; then 
  662.   echo shar: Will not clobber existing file \"'clients/echoconnect'\"
  663. else
  664. echo shar: Extracting \"'clients/echoconnect'\" \(158 characters\)
  665. sed "s/^X//" >'clients/echoconnect' <<'END_OF_FILE'
  666. X#!/bin/sh
  667. X# echoconnect version 1.0, 4/20/90.
  668. X# Placed into the public domain by Daniel J. Bernstein.
  669. Xauthtcp -XRv -- "${1-`hostname`}" echo multitee 0:6 6:1
  670. END_OF_FILE
  671. if test 158 -ne `wc -c <'clients/echoconnect'`; then
  672.     echo shar: \"'clients/echoconnect'\" unpacked with wrong size!
  673. fi
  674. chmod +x 'clients/echoconnect'
  675. # end of 'clients/echoconnect'
  676. fi
  677. if test -f 'clients/echoconnect.man' -a "${1}" != "-c" ; then 
  678.   echo shar: Will not clobber existing file \"'clients/echoconnect.man'\"
  679. else
  680. echo shar: Extracting \"'clients/echoconnect.man'\" \(349 characters\)
  681. sed "s/^X//" >'clients/echoconnect.man' <<'END_OF_FILE'
  682. X.TH echoconnect 1
  683. X.SH NAME
  684. Xechoconnect \- connect to an echo server
  685. X.SH SYNTAX
  686. Xechoconnect
  687. X[
  688. X.I host
  689. X]
  690. X.SH DESCRIPTION
  691. X.I echoconnect
  692. Xopens a connection to the echo server on a given host.
  693. XIf
  694. X.I host
  695. Xis not given,
  696. X.I echoconnect
  697. Xconnects to the local echo server.
  698. X.SH VERSION
  699. Xechoconnect version 1.0, dated April 20, 1990.
  700. X.SH "SEE ALSO"
  701. Xauthtcp(1)
  702. END_OF_FILE
  703. if test 349 -ne `wc -c <'clients/echoconnect.man'`; then
  704.     echo shar: \"'clients/echoconnect.man'\" unpacked with wrong size!
  705. fi
  706. # end of 'clients/echoconnect.man'
  707. fi
  708. if test -f 'clients/finger@' -a "${1}" != "-c" ; then 
  709.   echo shar: Will not clobber existing file \"'clients/finger@'\"
  710. else
  711. echo shar: Extracting \"'clients/finger@'\" \(232 characters\)
  712. sed "s/^X//" >'clients/finger@' <<'END_OF_FILE'
  713. X#!/bin/sh
  714. X# finger@ version 1.0, 4/20/90.
  715. X# Placed into the public domain by Daniel J. Bernstein.
  716. X# Requires addcr, delcr.
  717. Xauthtcp -XRv -- "${1-`hostname`}" finger \
  718. Xsh -c 'echo -n '"${2-}"' | addcr >&6;echo "" >&6;cat <&6' | delcr
  719. END_OF_FILE
  720. if test 232 -ne `wc -c <'clients/finger@'`; then
  721.     echo shar: \"'clients/finger@'\" unpacked with wrong size!
  722. fi
  723. chmod +x 'clients/finger@'
  724. # end of 'clients/finger@'
  725. fi
  726. if test -f 'clients/finger@.man' -a "${1}" != "-c" ; then 
  727.   echo shar: Will not clobber existing file \"'clients/finger@.man'\"
  728. else
  729. echo shar: Extracting \"'clients/finger@.man'\" \(404 characters\)
  730. sed "s/^X//" >'clients/finger@.man' <<'END_OF_FILE'
  731. X.TH finger@ 1
  732. X.SH NAME
  733. Xfinger@ \- finger users on remote host
  734. X.SH SYNTAX
  735. Xfinger@
  736. X[
  737. X.I host
  738. X[
  739. X.I user
  740. X] ]
  741. X.SH DESCRIPTION
  742. X.I finger@
  743. Xfingers users on a remote host
  744. Xthrough the
  745. Xfinger server.
  746. XIf
  747. X.I host
  748. Xis not given,
  749. X.I date@
  750. Xconnects to the local finger server.
  751. XIf
  752. X.I user
  753. Xis not given,
  754. X.I finger@
  755. Xshows all users logged on.
  756. X.SH VERSION
  757. Xfinger@ version 1.0, dated April 20, 1990.
  758. X.SH "SEE ALSO"
  759. Xfinger(1)
  760. END_OF_FILE
  761. if test 404 -ne `wc -c <'clients/finger@.man'`; then
  762.     echo shar: \"'clients/finger@.man'\" unpacked with wrong size!
  763. fi
  764. # end of 'clients/finger@.man'
  765. fi
  766. if test -f 'clients/mconnect' -a "${1}" != "-c" ; then 
  767.   echo shar: Will not clobber existing file \"'clients/mconnect'\"
  768. else
  769. echo shar: Extracting \"'clients/mconnect'\" \(195 characters\)
  770. sed "s/^X//" >'clients/mconnect' <<'END_OF_FILE'
  771. X#!/bin/sh
  772. X# mconnect version 1.0, 4/20/90.
  773. X# Placed into the public domain by Daniel J. Bernstein.
  774. X# Requires addcr, delcr.
  775. Xaddcr | authtcp -Rv -- "${1-`hostname`}" smtp multitee 0:6 6:1 | delcr
  776. END_OF_FILE
  777. if test 195 -ne `wc -c <'clients/mconnect'`; then
  778.     echo shar: \"'clients/mconnect'\" unpacked with wrong size!
  779. fi
  780. chmod +x 'clients/mconnect'
  781. # end of 'clients/mconnect'
  782. fi
  783. if test -f 'clients/mconnect.man' -a "${1}" != "-c" ; then 
  784.   echo shar: Will not clobber existing file \"'clients/mconnect.man'\"
  785. else
  786. echo shar: Extracting \"'clients/mconnect.man'\" \(344 characters\)
  787. sed "s/^X//" >'clients/mconnect.man' <<'END_OF_FILE'
  788. X.TH mconnect 1
  789. X.SH NAME
  790. Xmconnect \- connect to a mail (SMTP) server
  791. X.SH SYNTAX
  792. Xmconnect
  793. X[
  794. X.I host
  795. X]
  796. X.SH DESCRIPTION
  797. X.I mconnect
  798. Xopens a connection to the mail (SMTP) server on a given host.
  799. XIf
  800. X.I host
  801. Xis not given,
  802. X.I mconnect
  803. Xconnects to the local mail server.
  804. X.SH VERSION
  805. Xmconnect version 1.0, dated April 20, 1990.
  806. X.SH "SEE ALSO"
  807. Xauthtcp(1)
  808. END_OF_FILE
  809. if test 344 -ne `wc -c <'clients/mconnect.man'`; then
  810.     echo shar: \"'clients/mconnect.man'\" unpacked with wrong size!
  811. fi
  812. # end of 'clients/mconnect.man'
  813. fi
  814. if test -f 'clients/nconnect' -a "${1}" != "-c" ; then 
  815.   echo shar: Will not clobber existing file \"'clients/nconnect'\"
  816. else
  817. echo shar: Extracting \"'clients/nconnect'\" \(195 characters\)
  818. sed "s/^X//" >'clients/nconnect' <<'END_OF_FILE'
  819. X#!/bin/sh
  820. X# nconnect version 1.0, 4/20/90.
  821. X# Placed into the public domain by Daniel J. Bernstein.
  822. X# Requires addcr, delcr.
  823. Xaddcr | authtcp -Rv -- "${1-`hostname`}" nntp multitee 0:6 6:1 | delcr
  824. END_OF_FILE
  825. if test 195 -ne `wc -c <'clients/nconnect'`; then
  826.     echo shar: \"'clients/nconnect'\" unpacked with wrong size!
  827. fi
  828. chmod +x 'clients/nconnect'
  829. # end of 'clients/nconnect'
  830. fi
  831. if test -f 'clients/nconnect.man' -a "${1}" != "-c" ; then 
  832.   echo shar: Will not clobber existing file \"'clients/nconnect.man'\"
  833. else
  834. echo shar: Extracting \"'clients/nconnect.man'\" \(344 characters\)
  835. sed "s/^X//" >'clients/nconnect.man' <<'END_OF_FILE'
  836. X.TH nconnect 1
  837. X.SH NAME
  838. Xnconnect \- connect to a news (NNTP) server
  839. X.SH SYNTAX
  840. Xnconnect
  841. X[
  842. X.I host
  843. X]
  844. X.SH DESCRIPTION
  845. X.I nconnect
  846. Xopens a connection to the news (NNTP) server on a given host.
  847. XIf
  848. X.I host
  849. Xis not given,
  850. X.I nconnect
  851. Xconnects to the local news server.
  852. X.SH VERSION
  853. Xnconnect version 1.0, dated April 20, 1990.
  854. X.SH "SEE ALSO"
  855. Xauthtcp(1)
  856. END_OF_FILE
  857. if test 344 -ne `wc -c <'clients/nconnect.man'`; then
  858.     echo shar: \"'clients/nconnect.man'\" unpacked with wrong size!
  859. fi
  860. # end of 'clients/nconnect.man'
  861. fi
  862. if test -f 'clients/nullconnect' -a "${1}" != "-c" ; then 
  863.   echo shar: Will not clobber existing file \"'clients/nullconnect'\"
  864. else
  865. echo shar: Extracting \"'clients/nullconnect'\" \(161 characters\)
  866. sed "s/^X//" >'clients/nullconnect' <<'END_OF_FILE'
  867. X#!/bin/sh
  868. X# nullconnect version 1.0, 4/20/90.
  869. X# Placed into the public domain by Daniel J. Bernstein.
  870. Xauthtcp -XRv -- "${1-`hostname`}" discard multitee 0:6 6:1
  871. END_OF_FILE
  872. if test 161 -ne `wc -c <'clients/nullconnect'`; then
  873.     echo shar: \"'clients/nullconnect'\" unpacked with wrong size!
  874. fi
  875. chmod +x 'clients/nullconnect'
  876. # end of 'clients/nullconnect'
  877. fi
  878. if test -f 'clients/nullconnect.man' -a "${1}" != "-c" ; then 
  879.   echo shar: Will not clobber existing file \"'clients/nullconnect.man'\"
  880. else
  881. echo shar: Extracting \"'clients/nullconnect.man'\" \(357 characters\)
  882. sed "s/^X//" >'clients/nullconnect.man' <<'END_OF_FILE'
  883. X.TH nullconnect 1
  884. X.SH NAME
  885. Xnullconnect \- connect to a discard server
  886. X.SH SYNTAX
  887. Xnullconnect
  888. X[
  889. X.I host
  890. X]
  891. X.SH DESCRIPTION
  892. X.I nullconnect
  893. Xopens a connection to the discard server on a given host.
  894. XIf
  895. X.I host
  896. Xis not given,
  897. X.I nullconnect
  898. Xconnects to the local discard server.
  899. X.SH VERSION
  900. Xnullconnect version 1.0, dated April 20, 1990.
  901. X.SH "SEE ALSO"
  902. Xauthtcp(1)
  903. END_OF_FILE
  904. if test 357 -ne `wc -c <'clients/nullconnect.man'`; then
  905.     echo shar: \"'clients/nullconnect.man'\" unpacked with wrong size!
  906. fi
  907. # end of 'clients/nullconnect.man'
  908. fi
  909. if test -f 'clients/who@' -a "${1}" != "-c" ; then 
  910.   echo shar: Will not clobber existing file \"'clients/who@'\"
  911. else
  912. echo shar: Extracting \"'clients/who@'\" \(176 characters\)
  913. sed "s/^X//" >'clients/who@' <<'END_OF_FILE'
  914. X#!/bin/sh
  915. X# who@ version 1.0, 4/20/90.
  916. X# Placed into the public domain by Daniel J. Bernstein.
  917. X# Requires delcr.
  918. Xauthtcp -XR -- "${1-`hostname`}" users sh -c 'cat <&6' | delcr
  919. END_OF_FILE
  920. if test 176 -ne `wc -c <'clients/who@'`; then
  921.     echo shar: \"'clients/who@'\" unpacked with wrong size!
  922. fi
  923. chmod +x 'clients/who@'
  924. # end of 'clients/who@'
  925. fi
  926. if test -f 'clients/who@.man' -a "${1}" != "-c" ; then 
  927.   echo shar: Will not clobber existing file \"'clients/who@.man'\"
  928. else
  929. echo shar: Extracting \"'clients/who@.man'\" \(320 characters\)
  930. sed "s/^X//" >'clients/who@.man' <<'END_OF_FILE'
  931. X.TH who@ 1
  932. X.SH NAME
  933. Xwho@ \- print users on remote host
  934. X.SH SYNTAX
  935. Xwho@
  936. X[
  937. X.I host
  938. X]
  939. X.SH DESCRIPTION
  940. X.I who@
  941. Xlists the users logged onto a remote host
  942. Xthrough the
  943. Xsystat server.
  944. XIf
  945. X.I host
  946. Xis not given,
  947. X.I who@
  948. Xconnects to the local systat server.
  949. X.SH VERSION
  950. Xwho@ version 1.0, dated April 20, 1990.
  951. X.SH "SEE ALSO"
  952. Xwho(1)
  953. END_OF_FILE
  954. if test 320 -ne `wc -c <'clients/who@.man'`; then
  955.     echo shar: \"'clients/who@.man'\" unpacked with wrong size!
  956. fi
  957. # end of 'clients/who@.man'
  958. fi
  959. if test ! -d 'sendmail-auth' ; then
  960.     echo shar: Creating directory \"'sendmail-auth'\"
  961.     mkdir 'sendmail-auth'
  962. fi
  963. if test -f 'sendmail-auth/CHANGES' -a "${1}" != "-c" ; then 
  964.   echo shar: Will not clobber existing file \"'sendmail-auth/CHANGES'\"
  965. else
  966. echo shar: Extracting \"'sendmail-auth/CHANGES'\" \(36 characters\)
  967. sed "s/^X//" >'sendmail-auth/CHANGES' <<'END_OF_FILE'
  968. X4/23/90: sendmail-auth verison 1.0.
  969. END_OF_FILE
  970. if test 36 -ne `wc -c <'sendmail-auth/CHANGES'`; then
  971.     echo shar: \"'sendmail-auth/CHANGES'\" unpacked with wrong size!
  972. fi
  973. # end of 'sendmail-auth/CHANGES'
  974. fi
  975. if test -f 'sendmail-auth/cf.include' -a "${1}" != "-c" ; then 
  976.   echo shar: Will not clobber existing file \"'sendmail-auth/cf.include'\"
  977. else
  978. echo shar: Extracting \"'sendmail-auth/cf.include'\" \(288 characters\)
  979. sed "s/^X//" >'sendmail-auth/cf.include' <<'END_OF_FILE'
  980. X# Old: Mtcp, P=[IPC], F=AmnDFMpueXLC, S=14, R=14, A=IPC $h, E=\r\n
  981. X# Note that the builtin IPC uses [in.et.num.ber] for direct addresses.
  982. X# authtcp simply accepts the addresses without the brackets, as it should.
  983. XMtcp,   P=/etc/out.mail, F=AmnDFMpueXLC, S=14, R=14, A=out.mail $h, E=\r\n
  984. END_OF_FILE
  985. if test 288 -ne `wc -c <'sendmail-auth/cf.include'`; then
  986.     echo shar: \"'sendmail-auth/cf.include'\" unpacked with wrong size!
  987. fi
  988. # end of 'sendmail-auth/cf.include'
  989. fi
  990. if test -f 'sendmail-auth/in.maild' -a "${1}" != "-c" ; then 
  991.   echo shar: Will not clobber existing file \"'sendmail-auth/in.maild'\"
  992. else
  993. echo shar: Extracting \"'sendmail-auth/in.maild'\" \(369 characters\)
  994. sed "s/^X//" >'sendmail-auth/in.maild' <<'END_OF_FILE'
  995. X#!/bin/sh
  996. XLOG=/usr/adm/in.mail.log
  997. X
  998. Xif /usr/ucb/printenv REMOTE | /bin/grep -s '^@[^@]*$'
  999. Xthen # put here what you want to do for unauthenticated connections
  1000. X     /usr/bin/sleep 5 # let him know we care
  1001. Xfi
  1002. X
  1003. X/bin/echo "Date: `date` $$ from $REMOTE via $PROTO" >>"$LOG" 2>/dev/null
  1004. X/usr/lib/sendmail -bs
  1005. X/bin/echo "Done: `date` $$ `sh -c 'echo $$'`" >>"$LOG" 2>/dev/null
  1006. END_OF_FILE
  1007. if test 369 -ne `wc -c <'sendmail-auth/in.maild'`; then
  1008.     echo shar: \"'sendmail-auth/in.maild'\" unpacked with wrong size!
  1009. fi
  1010. chmod +x 'sendmail-auth/in.maild'
  1011. # end of 'sendmail-auth/in.maild'
  1012. fi
  1013. if test -f 'sendmail-auth/out.mail' -a "${1}" != "-c" ; then 
  1014.   echo shar: Will not clobber existing file \"'sendmail-auth/out.mail'\"
  1015. else
  1016. echo shar: Extracting \"'sendmail-auth/out.mail'\" \(188 characters\)
  1017. sed "s/^X//" >'sendmail-auth/out.mail' <<'END_OF_FILE'
  1018. X#!/bin/sh
  1019. Xexec 3>&1
  1020. X/usr/local/authtcp -- "$1" smtp /usr/local/multitee 0:6 6:3 2>&1 \
  1021. X| /bin/sed 's-^-421 -' | /bin/sed -n 'p
  1022. X$i\
  1023. X221 So long from your friendly local mailer.' >&3
  1024. Xexit 0
  1025. END_OF_FILE
  1026. if test 188 -ne `wc -c <'sendmail-auth/out.mail'`; then
  1027.     echo shar: \"'sendmail-auth/out.mail'\" unpacked with wrong size!
  1028. fi
  1029. chmod +x 'sendmail-auth/out.mail'
  1030. # end of 'sendmail-auth/out.mail'
  1031. fi
  1032. if test -f 'sendmail-auth/rc.include' -a "${1}" != "-c" ; then 
  1033.   echo shar: Will not clobber existing file \"'sendmail-auth/rc.include'\"
  1034. else
  1035. echo shar: Extracting \"'sendmail-auth/rc.include'\" \(259 characters\)
  1036. sed "s/^X//" >'sendmail-auth/rc.include' <<'END_OF_FILE'
  1037. X#!/bin/sh
  1038. X
  1039. Xif [ -f /usr/lib/sendmail ]; then
  1040. X    (cd /usr/spool/mqueue;rm -f lf*)
  1041. X    echo 'starting sendmail daemon'        > /dev/console 2>&1
  1042. X#    /usr/lib/sendmail -bd -q30m
  1043. X    /usr/lib/sendmail -q30m
  1044. X    /usr/local/attachport -vp smtp /etc/in.maild > /dev/console 2>&1 &
  1045. Xfi
  1046. END_OF_FILE
  1047. if test 259 -ne `wc -c <'sendmail-auth/rc.include'`; then
  1048.     echo shar: \"'sendmail-auth/rc.include'\" unpacked with wrong size!
  1049. fi
  1050. chmod +x 'sendmail-auth/rc.include'
  1051. # end of 'sendmail-auth/rc.include'
  1052. fi
  1053. if test ! -d 'servers' ; then
  1054.     echo shar: Creating directory \"'servers'\"
  1055.     mkdir 'servers'
  1056. fi
  1057. if test -f 'servers/CHANGES' -a "${1}" != "-c" ; then 
  1058.   echo shar: Will not clobber existing file \"'servers/CHANGES'\"
  1059. else
  1060. echo shar: Extracting \"'servers/CHANGES'\" \(30 characters\)
  1061. sed "s/^X//" >'servers/CHANGES' <<'END_OF_FILE'
  1062. X4/20/90: servers package 1.0.
  1063. END_OF_FILE
  1064. if test 30 -ne `wc -c <'servers/CHANGES'`; then
  1065.     echo shar: \"'servers/CHANGES'\" unpacked with wrong size!
  1066. fi
  1067. # end of 'servers/CHANGES'
  1068. fi
  1069. if test -f 'servers/in.daytimed' -a "${1}" != "-c" ; then 
  1070.   echo shar: Will not clobber existing file \"'servers/in.daytimed'\"
  1071. else
  1072. echo shar: Extracting \"'servers/in.daytimed'\" \(133 characters\)
  1073. sed "s/^X//" >'servers/in.daytimed' <<'END_OF_FILE'
  1074. X#!/bin/sh
  1075. X# in.daytimed version 1.0, 4/20/90.
  1076. X# Placed into the public domain by Daniel J. Bernstein.
  1077. X# Requires addcr.
  1078. Xdate | addcr
  1079. END_OF_FILE
  1080. if test 133 -ne `wc -c <'servers/in.daytimed'`; then
  1081.     echo shar: \"'servers/in.daytimed'\" unpacked with wrong size!
  1082. fi
  1083. chmod +x 'servers/in.daytimed'
  1084. # end of 'servers/in.daytimed'
  1085. fi
  1086. if test -f 'servers/in.echod' -a "${1}" != "-c" ; then 
  1087.   echo shar: Will not clobber existing file \"'servers/in.echod'\"
  1088. else
  1089. echo shar: Extracting \"'servers/in.echod'\" \(106 characters\)
  1090. sed "s/^X//" >'servers/in.echod' <<'END_OF_FILE'
  1091. X#!/bin/sh
  1092. X# in.daytimed version 1.0, 4/20/90.
  1093. X# Placed into the public domain by Daniel J. Bernstein.
  1094. Xcat
  1095. END_OF_FILE
  1096. if test 106 -ne `wc -c <'servers/in.echod'`; then
  1097.     echo shar: \"'servers/in.echod'\" unpacked with wrong size!
  1098. fi
  1099. chmod +x 'servers/in.echod'
  1100. # end of 'servers/in.echod'
  1101. fi
  1102. if test -f 'servers/in.fingerd' -a "${1}" != "-c" ; then 
  1103.   echo shar: Will not clobber existing file \"'servers/in.fingerd'\"
  1104. else
  1105. echo shar: Extracting \"'servers/in.fingerd'\" \(246 characters\)
  1106. sed "s/^X//" >'servers/in.fingerd' <<'END_OF_FILE'
  1107. X#!/bin/sh
  1108. X# in.daytimed version 1.0, 4/20/90.
  1109. X# Placed into the public domain by Daniel J. Bernstein.
  1110. X# Requires addcr and an out.finger reflecting your outside finger policy.
  1111. Xout.finger "`head -1 | sed 's- .*--' | tr -cd '[\041-\176]'`" | addcr
  1112. END_OF_FILE
  1113. if test 246 -ne `wc -c <'servers/in.fingerd'`; then
  1114.     echo shar: \"'servers/in.fingerd'\" unpacked with wrong size!
  1115. fi
  1116. chmod +x 'servers/in.fingerd'
  1117. # end of 'servers/in.fingerd'
  1118. fi
  1119. if test -f 'servers/in.nulld' -a "${1}" != "-c" ; then 
  1120.   echo shar: Will not clobber existing file \"'servers/in.nulld'\"
  1121. else
  1122. echo shar: Extracting \"'servers/in.nulld'\" \(122 characters\)
  1123. sed "s/^X//" >'servers/in.nulld' <<'END_OF_FILE'
  1124. X#!/bin/sh
  1125. X# in.daytimed version 1.0, 4/20/90.
  1126. X# Placed into the public domain by Daniel J. Bernstein.
  1127. Xcat >/dev/null 2>&1
  1128. END_OF_FILE
  1129. if test 122 -ne `wc -c <'servers/in.nulld'`; then
  1130.     echo shar: \"'servers/in.nulld'\" unpacked with wrong size!
  1131. fi
  1132. chmod +x 'servers/in.nulld'
  1133. # end of 'servers/in.nulld'
  1134. fi
  1135. if test -f 'servers/in.usersd' -a "${1}" != "-c" ; then 
  1136.   echo shar: Will not clobber existing file \"'servers/in.usersd'\"
  1137. else
  1138. echo shar: Extracting \"'servers/in.usersd'\" \(132 characters\)
  1139. sed "s/^X//" >'servers/in.usersd' <<'END_OF_FILE'
  1140. X#!/bin/sh
  1141. X# in.daytimed version 1.0, 4/20/90.
  1142. X# Placed into the public domain by Daniel J. Bernstein.
  1143. X# Requires addcr.
  1144. Xwho | addcr
  1145. END_OF_FILE
  1146. if test 132 -ne `wc -c <'servers/in.usersd'`; then
  1147.     echo shar: \"'servers/in.usersd'\" unpacked with wrong size!
  1148. fi
  1149. chmod +x 'servers/in.usersd'
  1150. # end of 'servers/in.usersd'
  1151. fi
  1152. if test -f 'servers/out.finger' -a "${1}" != "-c" ; then 
  1153.   echo shar: Will not clobber existing file \"'servers/out.finger'\"
  1154. else
  1155. echo shar: Extracting \"'servers/out.finger'\" \(555 characters\)
  1156. sed "s/^X//" >'servers/out.finger' <<'END_OF_FILE'
  1157. X#!/bin/sh
  1158. X# out.finger version 1.0, 4/20/90.
  1159. X# Placed into the public domain by Daniel J. Bernstein.
  1160. X# Requires u@h2h, u@h2u, out.fingernet, out.fingerlocal.
  1161. X# You may want to change this script to reflect your access controls.
  1162. Xhavenet=n
  1163. Xhaveloc=n
  1164. Xfor i
  1165. Xdo
  1166. X  export i
  1167. X  case "$i" in
  1168. X  *@*) out.fingernet "`printenv i | u@h2h`" "`printenv i | u@h2u`"
  1169. X       havenet=y;;
  1170. X  *) haveloc=y;;
  1171. X  esac
  1172. Xdone
  1173. Xcase "$haveloc" in
  1174. Xn) case "$havenet" in
  1175. X   n) out.fingerlocal;;
  1176. X   esac;;
  1177. Xy) out.fingerlocal `echo "$@" | tr ' ' '\012' | grep -v @ | tr '\012' ' '`;;
  1178. Xesac
  1179. END_OF_FILE
  1180. if test 555 -ne `wc -c <'servers/out.finger'`; then
  1181.     echo shar: \"'servers/out.finger'\" unpacked with wrong size!
  1182. fi
  1183. chmod +x 'servers/out.finger'
  1184. # end of 'servers/out.finger'
  1185. fi
  1186. if test -f 'servers/out.fingerlocal' -a "${1}" != "-c" ; then 
  1187.   echo shar: Will not clobber existing file \"'servers/out.fingerlocal'\"
  1188. else
  1189. echo shar: Extracting \"'servers/out.fingerlocal'\" \(264 characters\)
  1190. sed "s/^X//" >'servers/out.fingerlocal' <<'END_OF_FILE'
  1191. X#!/bin/sh
  1192. X# out.fingerlocal version 1.0, 4/20/90.
  1193. X# Placed into the public domain by Daniel J. Bernstein.
  1194. X# Requires a working local finger program.
  1195. X# You may want to change this script to reflect your access controls.
  1196. Xcase $# in
  1197. X0) finger;;
  1198. X*) finger "$@";;
  1199. Xesac
  1200. END_OF_FILE
  1201. if test 264 -ne `wc -c <'servers/out.fingerlocal'`; then
  1202.     echo shar: \"'servers/out.fingerlocal'\" unpacked with wrong size!
  1203. fi
  1204. chmod +x 'servers/out.fingerlocal'
  1205. # end of 'servers/out.fingerlocal'
  1206. fi
  1207. if test -f 'servers/out.fingernet' -a "${1}" != "-c" ; then 
  1208.   echo shar: Will not clobber existing file \"'servers/out.fingernet'\"
  1209. else
  1210. echo shar: Extracting \"'servers/out.fingernet'\" \(241 characters\)
  1211. sed "s/^X//" >'servers/out.fingernet' <<'END_OF_FILE'
  1212. X#!/bin/sh
  1213. X# out.fingernet version 1.0, 4/20/90.
  1214. X# Placed into the public domain by Daniel J. Bernstein.
  1215. X# Requires finger@.
  1216. X# You may want to change this script to reflect your access controls.
  1217. Xcase $# in
  1218. X0) finger@;;
  1219. X*) finger@ "$@";;
  1220. Xesac
  1221. END_OF_FILE
  1222. if test 241 -ne `wc -c <'servers/out.fingernet'`; then
  1223.     echo shar: \"'servers/out.fingernet'\" unpacked with wrong size!
  1224. fi
  1225. chmod +x 'servers/out.fingernet'
  1226. # end of 'servers/out.fingernet'
  1227. fi
  1228. if test -f 'servers/rc.include' -a "${1}" != "-c" ; then 
  1229.   echo shar: Will not clobber existing file \"'servers/rc.include'\"
  1230. else
  1231. echo shar: Extracting \"'servers/rc.include'\" \(400 characters\)
  1232. sed "s/^X//" >'servers/rc.include' <<'END_OF_FILE'
  1233. X#!/bin/sh
  1234. X# To use attachport rather than inetd for various network servers,
  1235. X# include the following lines in rc.local. You may want to redirect
  1236. X# startservers' output to a log file rather than /dev/console.
  1237. X
  1238. Xecho 'clearing old authentication entries' > /dev/console 2>&1
  1239. Xauthinit > /dev/console 2>&1
  1240. Xecho 'starting attachport-based servers' > /dev/console 2>&1
  1241. X/etc/startservers > /dev/console 2>&1
  1242. END_OF_FILE
  1243. if test 400 -ne `wc -c <'servers/rc.include'`; then
  1244.     echo shar: \"'servers/rc.include'\" unpacked with wrong size!
  1245. fi
  1246. # end of 'servers/rc.include'
  1247. fi
  1248. if test -f 'servers/startservers' -a "${1}" != "-c" ; then 
  1249.   echo shar: Will not clobber existing file \"'servers/startservers'\"
  1250. else
  1251. echo shar: Extracting \"'servers/startservers'\" \(1055 characters\)
  1252. sed "s/^X//" >'servers/startservers' <<'END_OF_FILE'
  1253. X#!/bin/sh
  1254. X# startservers version 1.0, 4/20/90.
  1255. X# Placed into the public domain by Daniel J. Bernstein.
  1256. X
  1257. X# Script to start servers for all the normal ports.
  1258. X# Requires: attachport in /usr/local, setuid in /bin, various servers
  1259. X#        in /etc. The path names aren't necessary.
  1260. X
  1261. XATTACH=/usr/local/attachport
  1262. XSETUID=/bin/setuid
  1263. X
  1264. X# The Authentication Server daemon. (-R is default for port 113.)
  1265. X$ATTACH -vRXp auth $SETUID auth /etc/authd &
  1266. X
  1267. X# Services provided through trivial shell scripts
  1268. X$ATTACH -vRXp echo $SETUID nobody /etc/in.echod &
  1269. X$ATTACH -vRXp discard $SETUID nobody /etc/in.nulld &
  1270. X$ATTACH -vRp daytime $SETUID nobody /etc/in.daytimed &
  1271. X$ATTACH -vp finger $SETUID nobody /etc/in.fingerd &
  1272. X$ATTACH -vRp users $SETUID nobody /etc/in.usersd &
  1273. X$ATTACH -vRXp chargen $SETUID nobody /etc/in.chargend &
  1274. X
  1275. X# Services provided through not so trivial programs
  1276. X$ATTACH -vp ftp /etc/ftpd &
  1277. X$ATTACH -vp telnet /etc/telnetd &
  1278. X$ATTACH -vp shell /etc/rshd &
  1279. X$ATTACH -vp login /etc/rlogind &
  1280. X$ATTACH -vp exec /etc/rexecd &
  1281. X$ATTACH -vp uucp $SETUID uucp /etc/uucpd &
  1282. END_OF_FILE
  1283. if test 1055 -ne `wc -c <'servers/startservers'`; then
  1284.     echo shar: \"'servers/startservers'\" unpacked with wrong size!
  1285. fi
  1286. chmod +x 'servers/startservers'
  1287. # end of 'servers/startservers'
  1288. fi
  1289. if test ! -d 'tam' ; then
  1290.     echo shar: Creating directory \"'tam'\"
  1291.     mkdir 'tam'
  1292. fi
  1293. if test -f 'tam/CHANGES' -a "${1}" != "-c" ; then 
  1294.   echo shar: Will not clobber existing file \"'tam/CHANGES'\"
  1295. else
  1296. echo shar: Extracting \"'tam/CHANGES'\" \(244 characters\)
  1297. sed "s/^X//" >'tam/CHANGES' <<'END_OF_FILE'
  1298. X4/23/90: tam package version 1.0.
  1299. X4/23/90: tamd version 1.0.
  1300. X4/23/90: tamsetup version 1.0.
  1301. X4/23/90: tamprint version 1.0.
  1302. X4/23/90: tamdel version 1.0.
  1303. X4/23/90: tam2look version 1.0.
  1304. X4/23/90: tam2mail version 1.0.
  1305. X4/23/90: tamsend version 1.0.
  1306. END_OF_FILE
  1307. if test 244 -ne `wc -c <'tam/CHANGES'`; then
  1308.     echo shar: \"'tam/CHANGES'\" unpacked with wrong size!
  1309. fi
  1310. # end of 'tam/CHANGES'
  1311. fi
  1312. if test -f 'tam/Makefile' -a "${1}" != "-c" ; then 
  1313.   echo shar: Will not clobber existing file \"'tam/Makefile'\"
  1314. else
  1315. echo shar: Extracting \"'tam/Makefile'\" \(940 characters\)
  1316. sed "s/^X//" >'tam/Makefile' <<'END_OF_FILE'
  1317. XCC=cc
  1318. XCCOPTS=-s -O
  1319. XNROFF=nroff
  1320. XNROFFOPTS=-man
  1321. X
  1322. Xdefault: all
  1323. X
  1324. Xall: tamdel tamprint tamsetup tamdel.1 tamprint.1 tamsetup.1 tamsend.1 tam2look.1 tam2mail.1 tamd.8
  1325. X
  1326. Xtamdel: tamdel.c Makefile
  1327. X    $(CC) $(CCOPTS) -o tamdel tamdel.c
  1328. X
  1329. Xtamprint: tamprint.c Makefile
  1330. X    $(CC) $(CCOPTS) -o tamprint tamprint.c
  1331. X
  1332. Xtamsetup: tamsetup.c Makefile
  1333. X    $(CC) $(CCOPTS) -o tamsetup tamsetup.c
  1334. X
  1335. Xtamdel.1: tamdel.man Makefile
  1336. X    $(NROFF) $(NROFFOPTS) < tamdel.man > tamdel.1
  1337. X
  1338. Xtamprint.1: tamprint.man Makefile
  1339. X    $(NROFF) $(NROFFOPTS) < tamprint.man > tamprint.1
  1340. X
  1341. Xtamsetup.1: tamsetup.man Makefile
  1342. X    $(NROFF) $(NROFFOPTS) < tamsetup.man > tamsetup.1
  1343. X
  1344. Xtamsend.1: tamsend.man Makefile
  1345. X    $(NROFF) $(NROFFOPTS) < tamsend.man > tamsend.1
  1346. X
  1347. Xtam2look.1: tam2look.man Makefile
  1348. X    $(NROFF) $(NROFFOPTS) < tam2look.man > tam2look.1
  1349. X
  1350. Xtam2mail.1: tam2mail.man Makefile
  1351. X    $(NROFF) $(NROFFOPTS) < tam2mail.man > tam2mail.1
  1352. X
  1353. Xtamd.8: tamd.man Makefile
  1354. X    $(NROFF) $(NROFFOPTS) < tamd.man > tamd.8
  1355. END_OF_FILE
  1356. if test 940 -ne `wc -c <'tam/Makefile'`; then
  1357.     echo shar: \"'tam/Makefile'\" unpacked with wrong size!
  1358. fi
  1359. # end of 'tam/Makefile'
  1360. fi
  1361. if test -f 'tam/rc.include' -a "${1}" != "-c" ; then 
  1362.   echo shar: Will not clobber existing file \"'tam/rc.include'\"
  1363. else
  1364. echo shar: Extracting \"'tam/rc.include'\" \(136 characters\)
  1365. sed "s/^X//" >'tam/rc.include' <<'END_OF_FILE'
  1366. X#!/bin/sh
  1367. X
  1368. Xecho 'starting tam daemon' > /dev/console 2>&1
  1369. X/usr/local/attachport -vp tam /bin/setuid tam /etc/tamd > /dev/console 2>&1 &
  1370. END_OF_FILE
  1371. if test 136 -ne `wc -c <'tam/rc.include'`; then
  1372.     echo shar: \"'tam/rc.include'\" unpacked with wrong size!
  1373. fi
  1374. chmod +x 'tam/rc.include'
  1375. # end of 'tam/rc.include'
  1376. fi
  1377. if test -f 'tam/services.include' -a "${1}" != "-c" ; then 
  1378.   echo shar: Will not clobber existing file \"'tam/services.include'\"
  1379. else
  1380. echo shar: Extracting \"'tam/services.include'\" \(27 characters\)
  1381. sed "s/^X//" >'tam/services.include' <<'END_OF_FILE'
  1382. Xtam        209/tcp        trivauthmail
  1383. END_OF_FILE
  1384. if test 27 -ne `wc -c <'tam/services.include'`; then
  1385.     echo shar: \"'tam/services.include'\" unpacked with wrong size!
  1386. fi
  1387. # end of 'tam/services.include'
  1388. fi
  1389. if test -f 'tam/tam2look' -a "${1}" != "-c" ; then 
  1390.   echo shar: Will not clobber existing file \"'tam/tam2look'\"
  1391. else
  1392. echo shar: Extracting \"'tam/tam2look'\" \(202 characters\)
  1393. sed "s/^X//" >'tam/tam2look' <<'END_OF_FILE'
  1394. X#!/bin/sh
  1395. X# tam2look version 1.0, 4/23/90.
  1396. X# Placed into the public domain by Daniel J. Bernstein.
  1397. Xawk '/^[^>]/ { if (p == 1) { print " "; p = 0 } }
  1398. X/^>/ { if (p == 0) { print ""; p = 1 } }
  1399. X{ print } '
  1400. END_OF_FILE
  1401. if test 202 -ne `wc -c <'tam/tam2look'`; then
  1402.     echo shar: \"'tam/tam2look'\" unpacked with wrong size!
  1403. fi
  1404. chmod +x 'tam/tam2look'
  1405. # end of 'tam/tam2look'
  1406. fi
  1407. if test -f 'tam/tam2look.man' -a "${1}" != "-c" ; then 
  1408.   echo shar: Will not clobber existing file \"'tam/tam2look.man'\"
  1409. else
  1410. echo shar: Extracting \"'tam/tam2look.man'\" \(529 characters\)
  1411. sed "s/^X//" >'tam/tam2look.man' <<'END_OF_FILE'
  1412. X.TH tam2look 1
  1413. X.SH NAME
  1414. Xtam2look \- format TAMbox input messages nicely
  1415. X.SH SYNTAX
  1416. Xtam2look
  1417. X.SH DESCRIPTION
  1418. X.I tam2look
  1419. Xtakes one or more TAMbox messages
  1420. X(see
  1421. X.I tamd(8))
  1422. Xas input
  1423. Xand formats them
  1424. Xa little more nicely.
  1425. XIt also inserts
  1426. Xformfeeds
  1427. Xat the right spots for
  1428. X.I more.
  1429. X.SH RESTRICTIONS
  1430. X.I tam2look
  1431. Xhandles long lines exactly as well as
  1432. X.I awk
  1433. Xdoes.
  1434. X.SH VERSION
  1435. Xtam2look version 1.0, dated 4/23/90.
  1436. X.SH AUTHOR
  1437. XPlaced into the public domain by Daniel J. Bernstein.
  1438. X.SH "SEE ALSO"
  1439. Xtamprint(1),
  1440. Xtam2mail(1),
  1441. Xmore(1),
  1442. Xtamd(8)
  1443. END_OF_FILE
  1444. if test 529 -ne `wc -c <'tam/tam2look.man'`; then
  1445.     echo shar: \"'tam/tam2look.man'\" unpacked with wrong size!
  1446. fi
  1447. # end of 'tam/tam2look.man'
  1448. fi
  1449. if test -f 'tam/tam2mail' -a "${1}" != "-c" ; then 
  1450.   echo shar: Will not clobber existing file \"'tam/tam2mail'\"
  1451. else
  1452. echo shar: Extracting \"'tam/tam2mail'\" \(379 characters\)
  1453. sed "s/^X//" >'tam/tam2mail' <<'END_OF_FILE'
  1454. X#!/bin/sh
  1455. X# tam2mail version 1.0, 4/23/90.
  1456. X# Placed into the public domain by Daniel J. Bernstein.
  1457. Xawk '
  1458. XBEGIN {
  1459. X  print "(sed s+X++ | mail -s '\''TAM incoming'\'' `whoami`) << \EOF"
  1460. X}
  1461. X/^[^>]/ { if (p == 1) {
  1462. X  print "EOF"
  1463. X  print "(sed s+X++ | mail -s '\''TAM incoming'\'' `whoami`) << \EOF"
  1464. Xp = 0 } }
  1465. X/^>/ { if (p == 0) { p = 1 } }
  1466. X{ print "X"$0 }
  1467. XEND {
  1468. X  print "EOF"
  1469. X} ' | sh
  1470. END_OF_FILE
  1471. if test 379 -ne `wc -c <'tam/tam2mail'`; then
  1472.     echo shar: \"'tam/tam2mail'\" unpacked with wrong size!
  1473. fi
  1474. chmod +x 'tam/tam2mail'
  1475. # end of 'tam/tam2mail'
  1476. fi
  1477. if test -f 'tam/tam2mail.man' -a "${1}" != "-c" ; then 
  1478.   echo shar: Will not clobber existing file \"'tam/tam2mail.man'\"
  1479. else
  1480. echo shar: Extracting \"'tam/tam2mail.man'\" \(493 characters\)
  1481. sed "s/^X//" >'tam/tam2mail.man' <<'END_OF_FILE'
  1482. X.TH tam2mail 1
  1483. X.SH NAME
  1484. Xtam2mail \- send TAMbox input messages to yourself as regular mail
  1485. X.SH SYNTAX
  1486. Xtam2mail
  1487. X.SH DESCRIPTION
  1488. X.I tam2mail
  1489. Xtakes one or more TAMbox messages
  1490. X(see
  1491. X.I tamd(8))
  1492. Xas input
  1493. Xand sends them to you
  1494. Xthrough regular mail.
  1495. X.SH RESTRICTIONS
  1496. X.I tam2mail
  1497. Xhandles long lines exactly as well as
  1498. X.I awk
  1499. Xdoes.
  1500. X.SH VERSION
  1501. Xtam2mail version 1.0, dated 4/23/90.
  1502. X.SH AUTHOR
  1503. XPlaced into the public domain by Daniel J. Bernstein.
  1504. X.SH "SEE ALSO"
  1505. Xtamdel(1),
  1506. Xtam2look(1),
  1507. Xmail(1),
  1508. Xtamd(8)
  1509. END_OF_FILE
  1510. if test 493 -ne `wc -c <'tam/tam2mail.man'`; then
  1511.     echo shar: \"'tam/tam2mail.man'\" unpacked with wrong size!
  1512. fi
  1513. # end of 'tam/tam2mail.man'
  1514. fi
  1515. if test -f 'tam/tamd' -a "${1}" != "-c" ; then 
  1516.   echo shar: Will not clobber existing file \"'tam/tamd'\"
  1517. else
  1518. echo shar: Extracting \"'tam/tamd'\" \(542 characters\)
  1519. sed "s/^X//" >'tam/tamd' <<'END_OF_FILE'
  1520. X#!/bin/sh
  1521. X# tamd version 1.0, 4/23/90.
  1522. X# Placed into the public domain by Daniel J. Bernstein.
  1523. X# Requires u@h2u, flock.
  1524. XTAMDIR=/usr/spool/tam; export TAMDIR
  1525. XTO="`/usr/ucb/head -1 | tr -d ./`"; export TO
  1526. Xif [ ! -w "$TAMDIR/$TO" ]
  1527. Xthen echo "TAM ERROR: $TO: No such user"; exit 2
  1528. Xfi
  1529. Xif printenv REMOTE | u@h2u | grep -s .
  1530. Xthen echo ""
  1531. Xelse echo "TAM ERROR: Unauthenticated"; exit 1
  1532. Xfi
  1533. Xflock "$TAMDIR/$TO" sh -c \
  1534. X  'exec >> "$TAMDIR/$TO";
  1535. X   echo "Received-From: $REMOTE via $PROTO";
  1536. X   echo "Received-Date: `date`";
  1537. X   sed "s+^+>+"; echo ">"'
  1538. END_OF_FILE
  1539. if test 542 -ne `wc -c <'tam/tamd'`; then
  1540.     echo shar: \"'tam/tamd'\" unpacked with wrong size!
  1541. fi
  1542. chmod +x 'tam/tamd'
  1543. # end of 'tam/tamd'
  1544. fi
  1545. if test -f 'tam/tamd.man' -a "${1}" != "-c" ; then 
  1546.   echo shar: Will not clobber existing file \"'tam/tamd.man'\"
  1547. else
  1548. echo shar: Extracting \"'tam/tamd.man'\" \(831 characters\)
  1549. sed "s/^X//" >'tam/tamd.man' <<'END_OF_FILE'
  1550. X.TH tamd 8
  1551. X.SH NAME
  1552. Xtamd \- TAM daemon
  1553. X.SH SYNTAX
  1554. X/etc/tamd
  1555. X.SH DESCRIPTION
  1556. X.I tamd
  1557. Xruns under
  1558. X.I attachport
  1559. Xaccepting connections to
  1560. Xport 209.
  1561. XIt implements the
  1562. XTAM protocol:
  1563. Xthe client says a user name,
  1564. Xthe server either returns a blank line for ``yes''
  1565. Xor an error message,
  1566. Xand the client sends a message to be delivered to that user.
  1567. X.PP
  1568. X.I tamd
  1569. Xdelivers the message into
  1570. Xthe user's TAMbox.
  1571. XMessages are any number of
  1572. Xlocal header lines,
  1573. Xfollowed by any number of
  1574. Xlines beginning with a >
  1575. Xas sent from the remote user.
  1576. X\fItamd\fB's
  1577. Xheader lines are
  1578. XReceived-From
  1579. Xand Received-Date.
  1580. X.SH VARIABLES
  1581. XREMOTE and PROTO, as set by
  1582. X.I attachport.
  1583. X.SH FILES
  1584. X/usr/spool/tam/*
  1585. XTAMboxes
  1586. X.SH VERSION
  1587. Xtamd version 1.0, dated 4/23/90.
  1588. X.SH AUTHOR
  1589. XPlaced into the public domain by Daniel J. Bernstein.
  1590. X.SH "SEE ALSO"
  1591. Xattachport(1),
  1592. Xtamsetup(1)
  1593. END_OF_FILE
  1594. if test 831 -ne `wc -c <'tam/tamd.man'`; then
  1595.     echo shar: \"'tam/tamd.man'\" unpacked with wrong size!
  1596. fi
  1597. # end of 'tam/tamd.man'
  1598. fi
  1599. if test -f 'tam/tamdel.man' -a "${1}" != "-c" ; then 
  1600.   echo shar: Will not clobber existing file \"'tam/tamdel.man'\"
  1601. else
  1602. echo shar: Extracting \"'tam/tamdel.man'\" \(1038 characters\)
  1603. sed "s/^X//" >'tam/tamdel.man' <<'END_OF_FILE'
  1604. X.TH tamdel 1
  1605. X.SH NAME
  1606. Xtamdel \- print and empty TAMbox
  1607. X.SH SYNTAX
  1608. Xtamdel
  1609. X.SH DESCRIPTION
  1610. X.I tamdel
  1611. Xprints and empties the user's TAMbox.
  1612. XThis operation is atomic:
  1613. X.I tamdel
  1614. Xwill never
  1615. Xaccidentally delete a message that it hasn't printed.
  1616. X.PP
  1617. XIt is useful to pipe
  1618. Xthe output of
  1619. X.I tamdel
  1620. Xinto a TAM postprocessor/archiver,
  1621. Xsuch as
  1622. X.I tam2mail.
  1623. X.SH FILES
  1624. X/usr/spool/tam/*
  1625. XTAMboxes
  1626. X.SH "EXIT VALUE"
  1627. X0 upon success;
  1628. Xor 1 through 7 in order of the diagnostics below.
  1629. X.SH DIAGNOSTICS
  1630. X.TP
  1631. X.I who are you?
  1632. XYou're not listed in the password file.
  1633. X.TP
  1634. X.I can't read tam spool file
  1635. XYour TAMbox is unreadable.
  1636. XThis shouldn't happen.
  1637. X.TP
  1638. X.I can't lock tam spool file
  1639. XThis shouldn't happen.
  1640. X.TP
  1641. X.I read error
  1642. XInput has failed.
  1643. X.TP
  1644. X.I write error
  1645. XOutput has failed.
  1646. X.TP
  1647. X.I can't create new tam spool file
  1648. XThis shouldn't happen.
  1649. X.TP
  1650. X.I can't recreate tam spool file
  1651. XThis shouldn't happen.
  1652. X.SH VERSION
  1653. Xtamdel version 1.0, dated 4/23/90.
  1654. X.SH AUTHOR
  1655. XPlaced into the public domain by Daniel J. Bernstein.
  1656. X.SH "SEE ALSO"
  1657. Xtamsetup(1),
  1658. Xtamprint(1),
  1659. Xtam2mail(1)
  1660. END_OF_FILE
  1661. if test 1038 -ne `wc -c <'tam/tamdel.man'`; then
  1662.     echo shar: \"'tam/tamdel.man'\" unpacked with wrong size!
  1663. fi
  1664. # end of 'tam/tamdel.man'
  1665. fi
  1666. if test -f 'tam/tamprint.c' -a "${1}" != "-c" ; then 
  1667.   echo shar: Will not clobber existing file \"'tam/tamprint.c'\"
  1668. else
  1669. echo shar: Extracting \"'tam/tamprint.c'\" \(1090 characters\)
  1670. sed "s/^X//" >'tam/tamprint.c' <<'END_OF_FILE'
  1671. X/* tamprint version 1.0, 4/23/90. */
  1672. X
  1673. X#include <stdio.h>
  1674. X#include <sys/file.h>
  1675. X#ifdef BSD
  1676. X#include <limits.h>
  1677. X#endif
  1678. X#include <pwd.h>
  1679. X
  1680. X#ifndef TAMDIR
  1681. X#define TAMDIR "/usr/spool/tam"
  1682. X#endif
  1683. X
  1684. X#ifndef BUFSIZ
  1685. X#define BUFSIZ 1024
  1686. X#endif
  1687. X
  1688. Xmain()
  1689. X{
  1690. X struct passwd *pw;
  1691. X char path[sizeof(TAMDIR) + 11];
  1692. X int fd;
  1693. X char buf[BUFSIZ];
  1694. X int r;
  1695. X
  1696. X if (!(pw = getpwuid(getuid())))
  1697. X  {
  1698. X   fprintf(stderr,"tamprint: fatal: who are you?\n");
  1699. X   exit(1);
  1700. X  }
  1701. X (void) sprintf(path,"%s/%s",TAMDIR,pw->pw_name);
  1702. X if ((fd = open(path,O_RDONLY)) == -1)
  1703. X  {
  1704. X   perror("tamprint: fatal: can't read tam spool file");
  1705. X   exit(2);
  1706. X  }
  1707. X if (flock(fd,LOCK_EX) == -1)
  1708. X  {
  1709. X   perror("tamprint: fatal: can't lock tam spool file");
  1710. X   exit(3);
  1711. X  }
  1712. X while ((r = read(fd,buf,sizeof(buf))) > 0)
  1713. X   if (write(1,buf,r) < r)
  1714. X    {
  1715. X     /* This may happen, incorrectly, if the output is nonblocking. */
  1716. X     /* We assume the usual convention that you never pass nonblocking fds. */
  1717. X     perror("tamprint: fatal: write error");
  1718. X     exit(5);
  1719. X    }
  1720. X if (r < 0)
  1721. X  {
  1722. X   perror("tamprint: fatal: read error");
  1723. X   exit(4);
  1724. X  }
  1725. X exit(0);
  1726. X}
  1727. END_OF_FILE
  1728. if test 1090 -ne `wc -c <'tam/tamprint.c'`; then
  1729.     echo shar: \"'tam/tamprint.c'\" unpacked with wrong size!
  1730. fi
  1731. # end of 'tam/tamprint.c'
  1732. fi
  1733. if test -f 'tam/tamprint.man' -a "${1}" != "-c" ; then 
  1734.   echo shar: Will not clobber existing file \"'tam/tamprint.man'\"
  1735. else
  1736. echo shar: Extracting \"'tam/tamprint.man'\" \(797 characters\)
  1737. sed "s/^X//" >'tam/tamprint.man' <<'END_OF_FILE'
  1738. X.TH tamprint 1
  1739. X.SH NAME
  1740. Xtamprint \- print TAMbox
  1741. X.SH SYNTAX
  1742. Xtamprint
  1743. X.SH DESCRIPTION
  1744. X.I tamprint
  1745. Xprints the user's TAMbox.
  1746. XIt is useful to pipe
  1747. Xthe output of
  1748. X.I tamprint
  1749. Xinto a TAM screen postprocessor,
  1750. Xsuch as
  1751. X.I tam2look.
  1752. X.SH FILES
  1753. X/usr/spool/tam/*
  1754. XTAMboxes
  1755. X.SH "EXIT VALUE"
  1756. X0 upon success;
  1757. Xor 1 through 5 in order of the diagnostics below.
  1758. X.SH DIAGNOSTICS
  1759. X.TP
  1760. X.I who are you?
  1761. XYou're not listed in the password file.
  1762. X.TP
  1763. X.I can't read tam spool file
  1764. XYour TAMbox is unreadable.
  1765. XThis shouldn't happen.
  1766. X.TP
  1767. X.I can't lock tam spool file
  1768. XThis shouldn't happen.
  1769. X.TP
  1770. X.I read error
  1771. XInput has failed.
  1772. X.TP
  1773. X.I write error
  1774. XOutput has failed.
  1775. X.SH VERSION
  1776. Xtamprint version 1.0, dated 4/23/90.
  1777. X.SH AUTHOR
  1778. XPlaced into the public domain by Daniel J. Bernstein.
  1779. X.SH "SEE ALSO"
  1780. Xtamsetup(1),
  1781. Xtamdel(1),
  1782. Xtam2look(1)
  1783. END_OF_FILE
  1784. if test 797 -ne `wc -c <'tam/tamprint.man'`; then
  1785.     echo shar: \"'tam/tamprint.man'\" unpacked with wrong size!
  1786. fi
  1787. # end of 'tam/tamprint.man'
  1788. fi
  1789. if test -f 'tam/tamsend' -a "${1}" != "-c" ; then 
  1790.   echo shar: Will not clobber existing file \"'tam/tamsend'\"
  1791. else
  1792. echo shar: Extracting \"'tam/tamsend'\" \(905 characters\)
  1793. sed "s/^X//" >'tam/tamsend' <<'END_OF_FILE'
  1794. X#!/bin/sh
  1795. X# tamsend version 1.0, 4/23/90.
  1796. X# Placed into the public domain by Daniel J. Bernstein.
  1797. X# Requires rewind, u@h2h, u@h2u.
  1798. XUSER="`whoami`"
  1799. XHOST="`hostname`.my.domain"
  1800. Xumask 077
  1801. Xexec 4>/tmp/tam1.$$ 5</tmp/tam1.$$
  1802. Xexec 8>/tmp/tam2.$$ 9</tmp/tam2.$$
  1803. Xrm /tmp/tam1.$$ /tmp/tam2.$$
  1804. Xif echo "Sent-From: $USER@$HOST" >&4 \
  1805. X&& echo "Sent-Date: `date`" >&4 \
  1806. X&& echo "Sent-To: $*" >&4 \
  1807. X&& echo "" >&4 \
  1808. X&& cat >&4
  1809. Xthen
  1810. X  ( for TO
  1811. X    do
  1812. X      case "$TO" in
  1813. X        *@*) ;;
  1814. X        *) TO="$TO@`hostname`";;
  1815. X      esac
  1816. X      export TO
  1817. X      authtcp -vR -- "`printenv TO | u@h2h`" tam \
  1818. X    sh -c 'printenv TO | u@h2u >&6;
  1819. X           head -1 <&6 | grep . ||
  1820. X           { multitee 5:6,8; rewind 4; rewind 5;
  1821. X         multitee 9:4; rewind 8; rewind 9; }' \
  1822. X      || echo "tamsend: ERROR: cannot send to $TO"
  1823. X    done
  1824. X    echo ""; echo "----- Message follows -----"; echo ""
  1825. X    cat <&5 ) 2>&1 | mail -s 'TAM log' "$USER" &
  1826. Xfi
  1827. END_OF_FILE
  1828. if test 905 -ne `wc -c <'tam/tamsend'`; then
  1829.     echo shar: \"'tam/tamsend'\" unpacked with wrong size!
  1830. fi
  1831. chmod +x 'tam/tamsend'
  1832. # end of 'tam/tamsend'
  1833. fi
  1834. if test -f 'tam/tamsend.man' -a "${1}" != "-c" ; then 
  1835.   echo shar: Will not clobber existing file \"'tam/tamsend.man'\"
  1836. else
  1837. echo shar: Extracting \"'tam/tamsend.man'\" \(1026 characters\)
  1838. sed "s/^X//" >'tam/tamsend.man' <<'END_OF_FILE'
  1839. X.TH tamsend 1
  1840. X.SH NAME
  1841. Xtamsend \- send authenticated mail to one or more TAMboxes
  1842. X.SH SYNTAX
  1843. Xtamsend
  1844. X\fBuser1@host1\fI
  1845. X...
  1846. X.SH DESCRIPTION
  1847. X.I tamsend
  1848. Xreads a message from standard input,
  1849. Xthen sends the message through TAM
  1850. Xto each recipient listed on the command line.
  1851. XIt sends an acknowledgement of any errors,
  1852. Xalong with a copy of the message,
  1853. Xto you through regular mail with subject
  1854. X``TAM log.''
  1855. X.PP
  1856. XThe acknowledgment is sent with the command
  1857. X.I mail -s 'TAM log' "`whoami`".
  1858. XYou can have it delivered differently
  1859. Xby setting up a different
  1860. X.I mail
  1861. Xsomewhere
  1862. Xin your PATH.
  1863. X.PP
  1864. XYou can leave the
  1865. X.B host
  1866. Xoff a recipient's name,
  1867. Xin which case
  1868. Xhe's assumed to be at the local host
  1869. X(or whatever
  1870. X.I hostname
  1871. Xsays).
  1872. X.PP
  1873. X.I tamsend
  1874. Xprepends the message
  1875. Xwith
  1876. XSent-From,
  1877. XSent-Date,
  1878. Xand Sent-To
  1879. Xheaders.
  1880. XThe recipients will detect any
  1881. Xforgery of Sent-From.
  1882. X.SH VERSION
  1883. Xtamsend version 1.0, dated 4/23/90.
  1884. X.SH AUTHOR
  1885. XPlaced into the public domain by Daniel J. Bernstein.
  1886. X.SH "SEE ALSO"
  1887. Xauthtcp(1),
  1888. Xtamsetup(1),
  1889. Xtamprint(1),
  1890. Xtamdel(1)
  1891. END_OF_FILE
  1892. if test 1026 -ne `wc -c <'tam/tamsend.man'`; then
  1893.     echo shar: \"'tam/tamsend.man'\" unpacked with wrong size!
  1894. fi
  1895. # end of 'tam/tamsend.man'
  1896. fi
  1897. if test -f 'tam/tamsetup.c' -a "${1}" != "-c" ; then 
  1898.   echo shar: Will not clobber existing file \"'tam/tamsetup.c'\"
  1899. else
  1900. echo shar: Extracting \"'tam/tamsetup.c'\" \(634 characters\)
  1901. sed "s/^X//" >'tam/tamsetup.c' <<'END_OF_FILE'
  1902. X/* tamsetup version 1.0, 4/23/90. */
  1903. X
  1904. X#include <stdio.h>
  1905. X#include <sys/file.h>
  1906. X#ifdef BSD
  1907. X#include <limits.h>
  1908. X#endif
  1909. X#include <pwd.h>
  1910. X
  1911. X#ifndef TAMDIR
  1912. X#define TAMDIR "/usr/spool/tam"
  1913. X#endif
  1914. X
  1915. Xmain()
  1916. X{
  1917. X struct passwd *pw;
  1918. X char path[sizeof(TAMDIR) + 11];
  1919. X int fd;
  1920. X
  1921. X if (!(pw = getpwuid(getuid())))
  1922. X  {
  1923. X   fprintf(stderr,"tamsetup: fatal: who are you?\n");
  1924. X   exit(1);
  1925. X  }
  1926. X (void) sprintf(path,"%s/%s",TAMDIR,pw->pw_name);
  1927. X if ((fd = open(path,O_WRONLY | O_CREAT | O_EXCL,0600)) == -1)
  1928. X  {
  1929. X   perror("tamsetup: fatal: can't create tam spool file");
  1930. X   exit(2);
  1931. X  }
  1932. X fprintf(stderr,"tamsetup: okay, tam spool file created\n");
  1933. X exit(0);
  1934. X}
  1935. END_OF_FILE
  1936. if test 634 -ne `wc -c <'tam/tamsetup.c'`; then
  1937.     echo shar: \"'tam/tamsetup.c'\" unpacked with wrong size!
  1938. fi
  1939. # end of 'tam/tamsetup.c'
  1940. fi
  1941. if test -f 'tam/tamsetup.man' -a "${1}" != "-c" ; then 
  1942.   echo shar: Will not clobber existing file \"'tam/tamsetup.man'\"
  1943. else
  1944. echo shar: Extracting \"'tam/tamsetup.man'\" \(956 characters\)
  1945. sed "s/^X//" >'tam/tamsetup.man' <<'END_OF_FILE'
  1946. X.TH tamsetup 1
  1947. X.SH NAME
  1948. Xtamsetup \- set up a TAMbox
  1949. X.SH SYNTAX
  1950. Xtamsetup
  1951. X.SH DESCRIPTION
  1952. X.I tamsetup
  1953. Xsets up a tam spool file or ``TAMbox''
  1954. Xfor you.
  1955. XTAM is the Trivial Authenticated Mail protocol;
  1956. Xit lets users send mail that, unlike regular mail,
  1957. Xcan't be forged
  1958. X(except by system administrators, of course).
  1959. XOnce you've set up a TAMbox, anyone around the network
  1960. Xcan send you authenticated mail.
  1961. X.PP
  1962. XThe format of the TAMbox is specified in
  1963. X.I tamd(8).
  1964. X.SH FILES
  1965. X/usr/spool/tam/*
  1966. XTAMboxes
  1967. X.SH "EXIT VALUE"
  1968. X0 upon success;
  1969. X1 if you're not recognizable;
  1970. X2 if you've already set up a TAMbox.
  1971. X.SH DIAGNOSTICS
  1972. X.TP
  1973. X.I who are you?
  1974. XYou're not listed in the password file.
  1975. X.TP
  1976. X.I can't create tam spool file
  1977. XProbably your TAMbox exists already.
  1978. X.TP
  1979. X.I okay, tam spool file created
  1980. XSuccess.
  1981. X.SH VERSION
  1982. Xtamsetup version 1.0, dated 4/23/90.
  1983. X.SH AUTHOR
  1984. XPlaced into the public domain by Daniel J. Bernstein.
  1985. X.SH "SEE ALSO"
  1986. Xtamprint(1),
  1987. Xtamdel(1),
  1988. Xtamsend(1),
  1989. Xtamd(8)
  1990. END_OF_FILE
  1991. if test 956 -ne `wc -c <'tam/tamsetup.man'`; then
  1992.     echo shar: \"'tam/tamsetup.man'\" unpacked with wrong size!
  1993. fi
  1994. # end of 'tam/tamsetup.man'
  1995. fi
  1996. if test ! -d 'util' ; then
  1997.     echo shar: Creating directory \"'util'\"
  1998.     mkdir 'util'
  1999. fi
  2000. if test -f 'util/CHANGES' -a "${1}" != "-c" ; then 
  2001.   echo shar: Will not clobber existing file \"'util/CHANGES'\"
  2002. else
  2003. echo shar: Extracting \"'util/CHANGES'\" \(27 characters\)
  2004. sed "s/^X//" >'util/CHANGES' <<'END_OF_FILE'
  2005. X4/20/90: util package 1.0.
  2006. END_OF_FILE
  2007. if test 27 -ne `wc -c <'util/CHANGES'`; then
  2008.     echo shar: \"'util/CHANGES'\" unpacked with wrong size!
  2009. fi
  2010. # end of 'util/CHANGES'
  2011. fi
  2012. if test -f 'util/Makefile' -a "${1}" != "-c" ; then 
  2013.   echo shar: Will not clobber existing file \"'util/Makefile'\"
  2014. else
  2015. echo shar: Extracting \"'util/Makefile'\" \(1115 characters\)
  2016. sed "s/^X//" >'util/Makefile' <<'END_OF_FILE'
  2017. XCC=cc
  2018. XCCOPTS=-s -O
  2019. XNROFF=nroff
  2020. XNROFFOPTS=-man
  2021. X
  2022. Xdefault: all
  2023. X
  2024. Xall: addcr delcr flock rewind setuid u@h2h u@h2u addcr.1 delcr.1 flock.1 rewind.1 setuid.1 u@h2h.1 u@h2u.1
  2025. X
  2026. Xaddcr: addcr.c Makefile
  2027. X    $(CC) $(CCOPTS) -o addcr addcr.c
  2028. X
  2029. Xdelcr: delcr.c Makefile
  2030. X    $(CC) $(CCOPTS) -o delcr delcr.c
  2031. X
  2032. Xflock: flock.c Makefile
  2033. X    $(CC) $(CCOPTS) -o flock flock.c
  2034. X
  2035. Xrewind: rewind.c Makefile
  2036. X    $(CC) $(CCOPTS) -o rewind rewind.c
  2037. X
  2038. Xsetuid: setuid.c Makefile
  2039. X    $(CC) $(CCOPTS) -o setuid setuid.c
  2040. X
  2041. Xu@h2h: u@h2h.c Makefile
  2042. X    $(CC) $(CCOPTS) -o u@h2h u@h2h.c
  2043. X
  2044. Xu@h2u: u@h2u.c Makefile
  2045. X    $(CC) $(CCOPTS) -o u@h2u u@h2u.c
  2046. X
  2047. Xaddcr.1: addcr.man Makefile
  2048. X    $(NROFF) $(NROFFOPTS) < addcr.man > addcr.1
  2049. X
  2050. Xdelcr.1: delcr.man Makefile
  2051. X    $(NROFF) $(NROFFOPTS) < delcr.man > delcr.1
  2052. X
  2053. Xflock.1: flock.man Makefile
  2054. X    $(NROFF) $(NROFFOPTS) < flock.man > flock.1
  2055. X
  2056. Xrewind.1: rewind.man Makefile
  2057. X    $(NROFF) $(NROFFOPTS) < rewind.man > rewind.1
  2058. X
  2059. Xsetuid.1: setuid.man Makefile
  2060. X    $(NROFF) $(NROFFOPTS) < setuid.man > setuid.1
  2061. X
  2062. Xu@h2h.1: u@h2h.man Makefile
  2063. X    $(NROFF) $(NROFFOPTS) < u@h2h.man > u@h2h.1
  2064. X
  2065. Xu@h2u.1: u@h2u.man Makefile
  2066. X    $(NROFF) $(NROFFOPTS) < u@h2u.man > u@h2u.1
  2067. END_OF_FILE
  2068. if test 1115 -ne `wc -c <'util/Makefile'`; then
  2069.     echo shar: \"'util/Makefile'\" unpacked with wrong size!
  2070. fi
  2071. # end of 'util/Makefile'
  2072. fi
  2073. if test -f 'util/README' -a "${1}" != "-c" ; then 
  2074.   echo shar: Will not clobber existing file \"'util/README'\"
  2075. else
  2076. echo shar: Extracting \"'util/README'\" \(1354 characters\)
  2077. sed "s/^X//" >'util/README' <<'END_OF_FILE'
  2078. Xutil version 1.0, April 20, 1990.
  2079. X
  2080. XThese short programs abbreviate some commonly needed operations.
  2081. X
  2082. Xaddcr version 1.0, April 20, 1990.
  2083. Xdelcr version 1.0, April 20, 1990.
  2084. Xflock version 1.0, April 20, 1990.
  2085. Xrewind version 1.0, April 20, 1990.
  2086. Xsetuid version 1.0, April 20, 1990.
  2087. Xu@h2h version 1.0, April 20, 1990.
  2088. Xu@h2u version 1.0, April 20, 1990.
  2089. XPublic domain.
  2090. X
  2091. XFiles:
  2092. XCHANGES         Description of changes since first distributed version
  2093. XREADME          This document
  2094. XMakefile        Installation commands
  2095. Xaddcr.c         addcr program
  2096. Xdelcr.c         delcr program
  2097. Xflock.c         flock program
  2098. Xrewind.c        rewind program
  2099. Xsetuid.c        setuid program
  2100. Xu@h2h.c         u@h2h program
  2101. Xu@h2u.c         u@h2u program
  2102. Xaddcr.man       addcr documentation
  2103. Xdelcr.man       delcr documentation
  2104. Xflock.man       flock documentation
  2105. Xrewind.man      rewind documentation
  2106. Xsetuid.man      setuid documentation
  2107. Xu@h2h.man       u@h2h documentation
  2108. Xu@h2u.man       u@h2u documentation
  2109. X
  2110. XEdit the options in Makefile and type make. addcr, delcr, flock, rewind,
  2111. Xsetuid, u@h2h, and u@h2u will be the executable programs; addcr.1,
  2112. Xdelcr.1, flock.1, rewind.1, setuid.1, u@h2h.1, and u@h2u.1 will be the
  2113. Xnroff'ed documentation.
  2114. X
  2115. XI don't pretend to know your machine's setup so there's no make install.
  2116. Xsetuid probably belongs in /bin; do not make it setuid to anything!
  2117. END_OF_FILE
  2118. if test 1354 -ne `wc -c <'util/README'`; then
  2119.     echo shar: \"'util/README'\" unpacked with wrong size!
  2120. fi
  2121. # end of 'util/README'
  2122. fi
  2123. if test -f 'util/addcr.c' -a "${1}" != "-c" ; then 
  2124.   echo shar: Will not clobber existing file \"'util/addcr.c'\"
  2125. else
  2126. echo shar: Extracting \"'util/addcr.c'\" \(224 characters\)
  2127. sed "s/^X//" >'util/addcr.c' <<'END_OF_FILE'
  2128. X/* addcr.c version 1.0, 4/20/90. */
  2129. X
  2130. X#include <stdio.h>
  2131. X
  2132. Xmain()
  2133. X{
  2134. X int ch;
  2135. X
  2136. X while ((ch = getchar()) != EOF)
  2137. X  {
  2138. X   if (ch == '\n')
  2139. X     putchar('\r');
  2140. X   putchar(ch);
  2141. X   if (ch == '\n')
  2142. X     fflush(stdout);
  2143. X  }
  2144. X exit(0);
  2145. X}
  2146. END_OF_FILE
  2147. if test 224 -ne `wc -c <'util/addcr.c'`; then
  2148.     echo shar: \"'util/addcr.c'\" unpacked with wrong size!
  2149. fi
  2150. # end of 'util/addcr.c'
  2151. fi
  2152. if test -f 'util/addcr.man' -a "${1}" != "-c" ; then 
  2153.   echo shar: Will not clobber existing file \"'util/addcr.man'\"
  2154. else
  2155. echo shar: Extracting \"'util/addcr.man'\" \(304 characters\)
  2156. sed "s/^X//" >'util/addcr.man' <<'END_OF_FILE'
  2157. X.TH addcr 1
  2158. X.SH NAME
  2159. Xaddcr \- add carriage returns before newlines
  2160. X.SH SYNTAX
  2161. Xaddcr
  2162. X.SH DESCRIPTION
  2163. X.I addcr
  2164. Xcopies its input to its output,
  2165. Xadding a carriage return
  2166. Xbefore each newline
  2167. Xand flushing its output after each line.
  2168. X.SH VERSION
  2169. Xaddcr version 1.0, dated April 20, 1990.
  2170. X.SH "SEE ALSO"
  2171. Xdelcr(1)
  2172. END_OF_FILE
  2173. if test 304 -ne `wc -c <'util/addcr.man'`; then
  2174.     echo shar: \"'util/addcr.man'\" unpacked with wrong size!
  2175. fi
  2176. # end of 'util/addcr.man'
  2177. fi
  2178. if test -f 'util/delcr.c' -a "${1}" != "-c" ; then 
  2179.   echo shar: Will not clobber existing file \"'util/delcr.c'\"
  2180. else
  2181. echo shar: Extracting \"'util/delcr.c'\" \(206 characters\)
  2182. sed "s/^X//" >'util/delcr.c' <<'END_OF_FILE'
  2183. X/* delcr.c version 1.0, 4/20/90. */
  2184. X
  2185. X#include <stdio.h>
  2186. X
  2187. Xmain()
  2188. X{
  2189. X int ch;
  2190. X
  2191. X while ((ch = getchar()) != EOF)
  2192. X  {
  2193. X   if (ch != '\r')
  2194. X     putchar(ch);
  2195. X   if (ch == '\n')
  2196. X     fflush(stdout);
  2197. X  }
  2198. X exit(0);
  2199. X}
  2200. END_OF_FILE
  2201. if test 206 -ne `wc -c <'util/delcr.c'`; then
  2202.     echo shar: \"'util/delcr.c'\" unpacked with wrong size!
  2203. fi
  2204. # end of 'util/delcr.c'
  2205. fi
  2206. if test -f 'util/delcr.man' -a "${1}" != "-c" ; then 
  2207.   echo shar: Will not clobber existing file \"'util/delcr.man'\"
  2208. else
  2209. echo shar: Extracting \"'util/delcr.man'\" \(276 characters\)
  2210. sed "s/^X//" >'util/delcr.man' <<'END_OF_FILE'
  2211. X.TH delcr 1
  2212. X.SH NAME
  2213. Xdelcr \- delete carriage returns
  2214. X.SH SYNTAX
  2215. Xdelcr
  2216. X.SH DESCRIPTION
  2217. X.I delcr
  2218. Xcopies its input to its output,
  2219. Xdeleting all carriage returns
  2220. Xand flushing its output after each line.
  2221. X.SH VERSION
  2222. Xdelcr version 1.0, dated April 20, 1990.
  2223. X.SH "SEE ALSO"
  2224. Xaddcr(1)
  2225. END_OF_FILE
  2226. if test 276 -ne `wc -c <'util/delcr.man'`; then
  2227.     echo shar: \"'util/delcr.man'\" unpacked with wrong size!
  2228. fi
  2229. # end of 'util/delcr.man'
  2230. fi
  2231. if test -f 'util/flock.c' -a "${1}" != "-c" ; then 
  2232.   echo shar: Will not clobber existing file \"'util/flock.c'\"
  2233. else
  2234. echo shar: Extracting \"'util/flock.c'\" \(518 characters\)
  2235. sed "s/^X//" >'util/flock.c' <<'END_OF_FILE'
  2236. X/* flock version 1.0, 4/20/90. */
  2237. X
  2238. X#include <sys/file.h>
  2239. X#ifdef BSD
  2240. X#include <limits.h>
  2241. X#endif
  2242. X#include <stdio.h>
  2243. X
  2244. Xmain(argc,argv)
  2245. Xint argc;
  2246. Xchar *argv[];
  2247. X{
  2248. X int fd;
  2249. X
  2250. X if (argc < 2)
  2251. X   { fputs("Usage: flock filename program [ arg ... ]\n",stderr); exit(1); }
  2252. X if ((fd = open(argv[1],O_RDONLY)) == -1)
  2253. X   { perror("flock: fatal: cannot open"); exit(2); }
  2254. X if (flock(fd,LOCK_EX) == -1)
  2255. X   { perror("flock: fatal: cannot flock"); exit(3); }
  2256. X execvp(argv[2],argv + 2);
  2257. X perror("flock: fatal: cannot execute");
  2258. X exit(4);
  2259. X}
  2260. END_OF_FILE
  2261. if test 518 -ne `wc -c <'util/flock.c'`; then
  2262.     echo shar: \"'util/flock.c'\" unpacked with wrong size!
  2263. fi
  2264. # end of 'util/flock.c'
  2265. fi
  2266. if test -f 'util/flock.man' -a "${1}" != "-c" ; then 
  2267.   echo shar: Will not clobber existing file \"'util/flock.man'\"
  2268. else
  2269. echo shar: Extracting \"'util/flock.man'\" \(587 characters\)
  2270. sed "s/^X//" >'util/flock.man' <<'END_OF_FILE'
  2271. X.TH flock 1
  2272. X.SH NAME
  2273. Xflock \- run a program with a file locked
  2274. X.SH SYNTAX
  2275. Xflock file program [arg ... ]
  2276. X.SH DESCRIPTION
  2277. X.I flock
  2278. Xopens
  2279. X.I file
  2280. Xfor reading,
  2281. Xsets an
  2282. Xexclusive
  2283. Xlock on it,
  2284. Xand runs
  2285. X.I program.
  2286. XWhen
  2287. X.I program
  2288. Xexits
  2289. X(along with any of its children that inherit the lock),
  2290. Xthe lock disappears.
  2291. X.PP
  2292. XThis is the simplest ``right'' way to lock files from
  2293. Xshell scripts.
  2294. X.SH DIAGNOSTICS
  2295. X.TP
  2296. X.I cannot open
  2297. XSelf-explanatory.
  2298. X.TP
  2299. X.I cannot flock
  2300. XSelf-explanatory.
  2301. X.TP
  2302. X.I cannot execute
  2303. XSelf-explanatory.
  2304. X.SH VERSION
  2305. Xflock version 1.0, dated April 20, 1990.
  2306. X.SH "SEE ALSO"
  2307. Xflock(2)
  2308. END_OF_FILE
  2309. if test 587 -ne `wc -c <'util/flock.man'`; then
  2310.     echo shar: \"'util/flock.man'\" unpacked with wrong size!
  2311. fi
  2312. # end of 'util/flock.man'
  2313. fi
  2314. if test -f 'util/rewind.c' -a "${1}" != "-c" ; then 
  2315.   echo shar: Will not clobber existing file \"'util/rewind.c'\"
  2316. else
  2317. echo shar: Extracting \"'util/rewind.c'\" \(320 characters\)
  2318. sed "s/^X//" >'util/rewind.c' <<'END_OF_FILE'
  2319. X/* rewind version 1.0, 4/20/90. */
  2320. X
  2321. X#include <sys/file.h>
  2322. X#include <stdio.h>
  2323. X
  2324. Xmain(argc,argv)
  2325. Xint argc;
  2326. Xchar *argv[];
  2327. X{
  2328. X int fd;
  2329. X
  2330. X if ((argc != 2) || (sscanf(argv[1],"%d",&fd) < 1))
  2331. X   { fputs("Usage: rewind fd\n",stderr); exit(1); }
  2332. X if (lseek(fd,0,0))
  2333. X   { perror("rewind: fatal: cannot seek"); exit(2); }
  2334. X exit(0);
  2335. X}
  2336. END_OF_FILE
  2337. if test 320 -ne `wc -c <'util/rewind.c'`; then
  2338.     echo shar: \"'util/rewind.c'\" unpacked with wrong size!
  2339. fi
  2340. # end of 'util/rewind.c'
  2341. fi
  2342. if test -f 'util/rewind.man' -a "${1}" != "-c" ; then 
  2343.   echo shar: Will not clobber existing file \"'util/rewind.man'\"
  2344. else
  2345. echo shar: Extracting \"'util/rewind.man'\" \(360 characters\)
  2346. sed "s/^X//" >'util/rewind.man' <<'END_OF_FILE'
  2347. X.TH rewind 1
  2348. X.SH NAME
  2349. Xrewind \- rewind a file descriptor
  2350. X.SH SYNTAX
  2351. Xrewind fd
  2352. X.SH DESCRIPTION
  2353. X.I rewind
  2354. Xseeks back to the beginning of
  2355. X.I fd.
  2356. X.SH DIAGNOSTICS
  2357. X.TP
  2358. X.I cannot seek
  2359. X.I rewind
  2360. Xis unable to change the file descriptor's position.
  2361. X.I fd
  2362. Xis probably
  2363. Xeither a pipe or closed.
  2364. X.SH VERSION
  2365. Xrewind version 1.0, dated April 20, 1990.
  2366. X.SH "SEE ALSO"
  2367. Xlseek(2)
  2368. END_OF_FILE
  2369. if test 360 -ne `wc -c <'util/rewind.man'`; then
  2370.     echo shar: \"'util/rewind.man'\" unpacked with wrong size!
  2371. fi
  2372. # end of 'util/rewind.man'
  2373. fi
  2374. if test -f 'util/setuid.c' -a "${1}" != "-c" ; then 
  2375.   echo shar: Will not clobber existing file \"'util/setuid.c'\"
  2376. else
  2377. echo shar: Extracting \"'util/setuid.c'\" \(576 characters\)
  2378. sed "s/^X//" >'util/setuid.c' <<'END_OF_FILE'
  2379. X/* setuid version 1.0, 4/20/90. */
  2380. X
  2381. X#include <stdio.h>
  2382. X#include <pwd.h>
  2383. X
  2384. Xmain(argc,argv)
  2385. Xint argc;
  2386. Xchar *argv[];
  2387. X{
  2388. X struct passwd pwm;
  2389. X struct passwd *pw = &pwm;
  2390. X
  2391. X if (argc < 3)
  2392. X   { fputs("Usage: setuid username program [ arg ... ]\n",stderr); exit(1); }
  2393. X if ((sscanf(argv[1],"%d",&pw->pw_uid) < 1) && (!(pw = getpwnam(argv[1]))))
  2394. X   { fprintf(stderr,"setuid: fatal: user %s unknown\n",argv[1]); exit(2); }
  2395. X if (setuid(pw->pw_uid) == -1)
  2396. X   { perror("setuid: fatal: cannot setuid"); exit(3); }
  2397. X execvp(argv[2],argv + 2);
  2398. X perror("setuid: fatal: cannot execute");
  2399. X exit(4);
  2400. X}
  2401. END_OF_FILE
  2402. if test 576 -ne `wc -c <'util/setuid.c'`; then
  2403.     echo shar: \"'util/setuid.c'\" unpacked with wrong size!
  2404. fi
  2405. # end of 'util/setuid.c'
  2406. fi
  2407. if test -f 'util/setuid.man' -a "${1}" != "-c" ; then 
  2408.   echo shar: Will not clobber existing file \"'util/setuid.man'\"
  2409. else
  2410. echo shar: Extracting \"'util/setuid.man'\" \(589 characters\)
  2411. sed "s/^X//" >'util/setuid.man' <<'END_OF_FILE'
  2412. X.TH setuid 1
  2413. X.SH NAME
  2414. Xsetuid \- run a program as a different uid
  2415. X.SH SYNTAX
  2416. Xsetuid user program [arg ... ]
  2417. X.SH DESCRIPTION
  2418. X.I setuid
  2419. Xsets its uid to
  2420. X.I user
  2421. Xand runs
  2422. X.I program
  2423. Xwith the given arguments.
  2424. X.I user
  2425. Xcan be given as a login name or a number.
  2426. X.PP
  2427. XThis command really isn't very useful for anyone except root.
  2428. X.SH DIAGNOSTICS
  2429. X.TP
  2430. X.I user unknown
  2431. X.I setuid
  2432. Xcannot recognize the nonnumeric
  2433. X.I user.
  2434. X.TP
  2435. X.I cannot setuid
  2436. XYou're not allowed to set your uid.
  2437. X.TP
  2438. X.I cannot execute
  2439. XSelf-explanatory.
  2440. X.SH VERSION
  2441. Xsetuid version 1.0, dated April 20, 1990.
  2442. X.SH "SEE ALSO"
  2443. Xsu(1),
  2444. Xsetuid(2)
  2445. END_OF_FILE
  2446. if test 589 -ne `wc -c <'util/setuid.man'`; then
  2447.     echo shar: \"'util/setuid.man'\" unpacked with wrong size!
  2448. fi
  2449. # end of 'util/setuid.man'
  2450. fi
  2451. if test -f 'util/u@h2h.c' -a "${1}" != "-c" ; then 
  2452.   echo shar: Will not clobber existing file \"'util/u@h2h.c'\"
  2453. else
  2454. echo shar: Extracting \"'util/u@h2h.c'\" \(269 characters\)
  2455. sed "s/^X//" >'util/u@h2h.c' <<'END_OF_FILE'
  2456. X/* u@h2h version 1.0, 4/20/90. */
  2457. X
  2458. X#include <stdio.h>
  2459. X
  2460. Xmain()
  2461. X{
  2462. X char buf[2048];
  2463. X int i;
  2464. X int j;
  2465. X
  2466. X while (fgets(buf,sizeof(buf),stdin) != NULL)
  2467. X  {
  2468. X   j = -1;
  2469. X   for (i = 0;buf[i];i++)
  2470. X     if (buf[i] == '@')
  2471. X       j = i;
  2472. X   fputs(buf + j + 1,stdout);
  2473. X  }
  2474. X exit(0);
  2475. X}
  2476. END_OF_FILE
  2477. if test 269 -ne `wc -c <'util/u@h2h.c'`; then
  2478.     echo shar: \"'util/u@h2h.c'\" unpacked with wrong size!
  2479. fi
  2480. # end of 'util/u@h2h.c'
  2481. fi
  2482. if test -f 'util/u@h2h.man' -a "${1}" != "-c" ; then 
  2483.   echo shar: Will not clobber existing file \"'util/u@h2h.man'\"
  2484. else
  2485. echo shar: Extracting \"'util/u@h2h.man'\" \(320 characters\)
  2486. sed "s/^X//" >'util/u@h2h.man' <<'END_OF_FILE'
  2487. X.TH u@h2h 1
  2488. X.SH NAME
  2489. Xu@h2h \- extract host from user@host
  2490. X.SH SYNTAX
  2491. Xu@h2h
  2492. X.SH DESCRIPTION
  2493. X.I u@h2h
  2494. Xremoves everything before the last @ in each line,
  2495. Xas well as the @ itself.
  2496. X.SH RESTRICTIONS
  2497. XInput lines must be shorter than 2048 characters.
  2498. X.SH VERSION
  2499. Xu@h2h version 1.0, dated April 20, 1990.
  2500. X.SH "SEE ALSO"
  2501. Xu@h2u(1)
  2502. END_OF_FILE
  2503. if test 320 -ne `wc -c <'util/u@h2h.man'`; then
  2504.     echo shar: \"'util/u@h2h.man'\" unpacked with wrong size!
  2505. fi
  2506. # end of 'util/u@h2h.man'
  2507. fi
  2508. if test -f 'util/u@h2u.c' -a "${1}" != "-c" ; then 
  2509.   echo shar: Will not clobber existing file \"'util/u@h2u.c'\"
  2510. else
  2511. echo shar: Extracting \"'util/u@h2u.c'\" \(297 characters\)
  2512. sed "s/^X//" >'util/u@h2u.c' <<'END_OF_FILE'
  2513. X/* u@h2u version 1.0, 4/20/90. */
  2514. X
  2515. X#include <stdio.h>
  2516. X
  2517. Xmain()
  2518. X{
  2519. X char buf[2048];
  2520. X int i;
  2521. X int j;
  2522. X
  2523. X while (fgets(buf,sizeof(buf),stdin) != NULL)
  2524. X  {
  2525. X   j = 0;
  2526. X   for (i = 0;buf[i];i++)
  2527. X     if (buf[i] == '@')
  2528. X       j = i;
  2529. X   buf[j] = '\n';
  2530. X   buf[j + 1] = 0;
  2531. X   fputs(buf,stdout);
  2532. X  }
  2533. X exit(0);
  2534. X}
  2535. END_OF_FILE
  2536. if test 297 -ne `wc -c <'util/u@h2u.c'`; then
  2537.     echo shar: \"'util/u@h2u.c'\" unpacked with wrong size!
  2538. fi
  2539. # end of 'util/u@h2u.c'
  2540. fi
  2541. if test -f 'util/u@h2u.man' -a "${1}" != "-c" ; then 
  2542.   echo shar: Will not clobber existing file \"'util/u@h2u.man'\"
  2543. else
  2544. echo shar: Extracting \"'util/u@h2u.man'\" \(319 characters\)
  2545. sed "s/^X//" >'util/u@h2u.man' <<'END_OF_FILE'
  2546. X.TH u@h2u 1
  2547. X.SH NAME
  2548. Xu@h2u \- extract user from user@host
  2549. X.SH SYNTAX
  2550. Xu@h2u
  2551. X.SH DESCRIPTION
  2552. X.I u@h2u
  2553. Xremoves everything after the last @ in each line,
  2554. Xas well as the @ itself.
  2555. X.SH RESTRICTIONS
  2556. XInput lines must be shorter than 2048 characters.
  2557. X.SH VERSION
  2558. Xu@h2u version 1.0, dated April 20, 1990.
  2559. X.SH "SEE ALSO"
  2560. Xu@h2h(1)
  2561. END_OF_FILE
  2562. if test 319 -ne `wc -c <'util/u@h2u.man'`; then
  2563.     echo shar: \"'util/u@h2u.man'\" unpacked with wrong size!
  2564. fi
  2565. # end of 'util/u@h2u.man'
  2566. fi
  2567. echo shar: End of archive 1 \(of 3\).
  2568. cp /dev/null ark1isdone
  2569. MISSING=""
  2570. for I in 1 2 3 ; do
  2571.     if test ! -f ark${I}isdone ; then
  2572.     MISSING="${MISSING} ${I}"
  2573.     fi
  2574. done
  2575. if test "${MISSING}" = "" ; then
  2576.     echo You have unpacked all 3 archives.
  2577.     rm -f ark[1-9]isdone
  2578. else
  2579.     echo You still need to unpack the following archives:
  2580.     echo "        " ${MISSING}
  2581. fi
  2582. ##  End of shell archive.
  2583. exit 0
  2584. exit 0 # Just in case...
  2585.